Latex pillows often have a rubber-like smell that comes from the plastic packaging they're wrapped in. Even though it has an unpleasant, albeit temporary, scent, natural latex is marketed as a hypoallergenic product. Shredded and solid latex pillows may require different treatments to eliminate odor.
You may be able remove odor from a machine-washable shredded-latex pillow by simply laundering it as directed on the care and laundering tag, which might suggest a cool water setting and hanging it to dry.
Non-washable solid latex pillows take a few days to off-gas. Air out your pillow on a clothesline on a cloudy, but dry day -- sun can break down and discolor natural latex -- or put it in a seldom-used room, and turn on a fan or open a window to speed up the process.
If you can't wait a few days for your pillow to air out, prop it in a clean, dry bathtub, sprinkle both sides with baking soda, wait as long as you can, and then vacuum off the naturally deodorizing powder. A quality protective cover can help filter any lingering odor, but until the smell dissipates completely, remove it daily to let your pillow "breathe."