Whole olives can be marvelous as a simple appetizer, but if you want to use them in tapenades, stews, or other dishes, they usually need to be pitted. The technique you use to remove the pit usually depends on the type of olive. Some have flesh that sticks to the pit, while other varieties are softer and will yield their pits with less of a struggle.
The pits of some soft black olives slip right out. Many varieties of brine-cured black olives, like Gaeta, are so soft that you can force out the pit simply by pinching both ends of the olive between your forefingers and thumbs. Tiny niçoise olives are particularly easy, as are most leathery and shriveled oil- or salt-cured olives. The flesh slides off with no resistance.
Meaty, firm olives require a bit more force. Green olives (which are cured from unripe olives) and even some of the harder black olives need some prodding to make them give up their pits.
When I have to pit a lot of such stubborn olives, I use the side of a heavy chef´s knife. I put the olive on a work surface, set the flat side of the knife on top, and give it a good whack. The force splits open the olive and frees the pit. Be sure to wipe the knife blade frequently because it gets oily—and very slippery—after splitting a few olives.
Some chefs prefer another method. They place the olive on a steady work surface and flatten it with their thumb until they can feel the pit. This loosens the pit and usually cracks the flesh enough to squeeze or pull the pit out.