your thumb and forefinger until
the pit pops out.
If you're snacking on olives, the pits aren't much of a problem. If you're cooking with the olives, however, you'll want to remove the pits.
Some cherry-size olives can be pitted with a cherry pitter. If you don't have one or if the olives are the wrong size, make a small x-shaped cut with the tip of a sharp knife on one end of the olive; then pinch the other end between your thumb and forefinger until the pit pops out.
If that fails, gently crush the long side of the olive with the heel of your hand or the flat side of a large knife blade, then pull the pit out.