The one thing worth knowing before you buy a cocktail dress is that fit at the hip and the way it sits when you sit down matter more than how it looks standing still in front of a mirror. Most of an evening happens sitting, walking, reaching for a glass, so a dress that's perfect at a standstill but rides up the second you cross your legs is the wrong dress, however good the photo in the changing room looks.
In the shop, check the lining first, because a cheap outer fabric can get away with a lot if it's properly lined, and a nice fabric feels horrible if it isn't. Check the zip is metal or a decent plastic coil rather than the flimsy sort that catches on the first wear. Sit down in it before you decide anything, properly sit, and see what the hem does and whether the neckline gapes when you lean forward. If there's a slit, check how high it actually goes when you walk, not just when you stand still, because a slit that looks modest in a mirror can be a different story on a dance floor. If you own none of these yet, start with something in a dark, unfussy colour with a simple shape, no cutouts, no complicated straps, nothing that needs a special bra you don't own. A plain shift or a simple wrap style in black or a deep wine will do more jobs than anything bolder, and it won't date the way a trend print will. The fancier, more memorable dress can come second, once you know what actually suits your shape and your life, rather than what looked good on someone else entirely.
Pairing it is simpler than people expect. A good plain cocktail dress works with the shoes you already own for smarter days, a coat you'd wear to anything else, and jewellery you're not precious about losing at a party. I've worn the same black dress with trainers for a daytime wedding and heels for the evening bit, same dress, completely different outfit, and nobody clocked it either time. A denim jacket thrown over it on the way home works better than people admit, it just looks deliberate rather than desperate, which is really all anyone's going for at midnight.
The one mistake to avoid is buying for the dress you'll be in for ten minutes of photographs rather than the one you'll be in for the five hours either side of them. Comfort isn't the opposite of looking good here, it's the only way to actually manage it for an entire evening.