As previously stated, make sure the tags say it is machine washable. You don't want to ruin your pillows. Most down and synthetics are safe to be washed.
Start running your washing machine on the longest cycle using hot water.
Add in your laundry detergent soap, baking soda, and bleach, and then place two pillows in the washer. It usually is best to select a gentle cycle.
After your washer fills up with hot water, turn it off and let your pillows soak for 1 hour. You can go push the pillows down and move them once during the wait time if you want to help make sure that all areas of the pillow get treated.
After the hour duration is up, run the rest of the washing cycle like you normally would.
Toss pillows in the dryer (see setting preference in the note below) to get them dry.