How do I stop my thighs rubbing together when I wear a dress?

You stop thigh rub in a dress by putting a smooth barrier between your thighs. That is the whole answer, and everything else in this post is detail around it. Skin on skin, under a dress, on a warm day, rubs. A layer that stops the skin touching stops the rub.
Why do thighs rub in a dress?
Thighs rub because there is nothing between them. Under trousers, the fabric does the job. Under a dress or skirt, skin meets skin, and walking repeats the contact hundreds of times. Heat and sweat make it worse: damp skin grips more than dry skin, which is why a short walk on a cool day can pass without trouble and a long afternoon in summer cannot. It is not a weight problem and it is not a fitness problem. It is a contact problem, and contact problems have contact answers.
What stops it most directly?
A smooth pair of slip shorts under the dress. They sit high on the waist, run to mid-thigh, and keep a thin layer of fabric where the skin would otherwise meet. Ours are seamless, so there is no seam line to show through the dress, and the waistband is wide and flat, which is what keeps them where you put them. They come in beige and black, in sizes S to XL, and they cost $28 at Her Velora.
Colour choice is practical, not decorative: beige under a pale or white dress, black under a dark one. A beige pair under a white dress does two jobs at once — it stops the rub, and it stops anything showing through a pale fabric. That second job is worth stating, because a white dress with nothing under it is a separate problem that the same pair solves.

One honest sizing note, from the product page itself: these run small. If you are between sizes, take the larger one. A pair that is too tight will roll at the waistband and dig at the leg, and it will not stay comfortable for a full day. The right size disappears under the dress; the wrong size is all you think about.

What else helps on a long hot day?
A barrier layer is the direct answer, but a few other things help on a long day, and they cost nothing. Anti-chafe balm or powder, applied before you leave, reduces friction for a few hours — useful on a day when you do not want another layer, less reliable than shorts on a very long or very hot day. Changing out of damp clothing when you get the chance helps, because damp skin grips. And the dress itself matters: a breathable fabric that lets air through will keep you drier than a heavy synthetic, which keeps the whole problem smaller. None of these replaces the barrier on a day when you know you will be walking a lot. They are the supporting cast, not the answer.
Slip shorts or shaping shorts — which one?
They are different products with different jobs, and it helps to keep them apart. Slip shorts are a plain barrier: no compression, no shaping, just a smooth layer that stops skin meeting skin. Shaping shorts compress and smooth the silhouette — a different job, with a different fit and a different feel. If your problem is rub, you want the plain barrier. If your problem is the line of the dress, you want shaping. Buying shaping shorts for a rub problem gives you a tighter garment doing a job it was not bought for, and buying slip shorts for a shaping problem gives you no shaping at all. Match the product to the problem, not to the drawer they both live in.

How do you keep slip shorts from showing?
A barrier layer only works if it stays invisible, and three things decide that: length, colour and waistband. The leg should end well above the dress hem — mid-thigh shorts under a knee-length dress leave a clear margin, and the margin is what keeps the shorts out of sight when you sit, cross your legs or climb stairs. Colour does the rest: beige under pale dresses, black under dark ones, matched to the dress rather than to your skin or to each other. And the waistband should sit flat under the dress’s waistline, not above it, so it does not print through a fitted bodice. If you can see the shorts’ edge through the dress in the mirror at home, the dress will show it in daylight too — change the colour or the length before you leave, not after you arrive.
When is it not a shorts problem?
If the skin is already broken, blistered or getting worse, shorts are not the answer that day. Let it heal, keep the area clean and dry, and get guidance if it is not improving. This post is not medical advice, and no pair of shorts fixes skin that is already damaged — putting a layer over sore skin and walking all day will make it worse, not better. The shorts are for prevention, on unbroken skin. That limit matters, and it is better stated here than discovered halfway through a wedding.

The short version
Thigh rub is skin on skin, and the fix is a smooth layer between. Seamless slip shorts in beige or black, $28, in S to XL, do it without showing through the dress — take the larger size if you are between sizes. For what else goes under a dress, see what to wear under a sleeveless dress.

[…] For the lower half, the choice depends on what problem you are solving. If the problem is show-through and visible lines, seamless slip shorts are the answer. Our slip shorts are $28, seamless, high-waist, and sit under a dress without a visible edge. The beige pair is the one for a white or pale dress; the black pair is for dark dresses. They also stop thigh rub, which is a separate comfort question answered in how do I stop my thighs rubbing together when I wear a dress. […]