A good pillow should keep your head, neck, and spine in neutral alignment. To support the head fully the pillow should be nicely tucked into your neck and shoulder.
According to The Sleep Council, a pillow that is too soft will cause your head to flop and a pillow that is too hard will cause neck pain and stiffness.
To choose the right one for you, think about your sleep position. There are pillows recommended for side, back, front, and combination sleepers but there are also different fillings to choose from offering a variety of benefits.
Back sleepers will benefit most from a medium-firm pillow with a medium loft. If it's too soft, your head will sink to a point of little support, and if the pillow is too high, you could be causing undesired strain on your neck. You also want a pillow that won't go flat during the night, making a memory foam or latex pillow a great choice for you!
Side sleepers will love all the loft to cushion their heads and necks. They'll do best with a firmer pillow that keeps them from sinking too far down, which could cause neck strain if your body is not in alignment. Though a little sink-in motion and a fluffy, moldable feeling are desired too.
Stomach sleepers have the highest risk of dealing with neck pain, and even applying pressure on your lower back or abdomen. These sleepers will need a flatter and a soft pillow to help keep heads and necks more in line with the rest of their bodies. A huggable or moldable design is especially beneficial for helping your head conform to the pillow, and for holding on to the pillow while you sleep.
Additionally, allergy sufferers might want to consider microfiber, silk, or memory foam. Other important features to consider are the pillow height or loft, support, and breathability.
This does, of course, mean that if you have a partner, you may each need entirely different pillows, so don't stop assuming that one size (and shape and filling) fits all.