Fill a bowl with warm water and add 1 tbsp. of mild laundry detergent.
Agitate the water with a clean cloth to create suds. Wring out the cloth.
Flip the pillow over to the side from which the smell is coming. This is probably the side you sleep on most often, and may have stains from skin or hair oils, makeup or hair products.
Wipe down the dirty spots of the pillow with the damp cloth. Gently blot any stains until they come out.
Set the pillow in a cool room, away from sunlight, and let it air-dry for 24 hours. Put a waterproof pillow cover over the pillow before you use it again to prevent it from absorbing body odors.