Remove the hard bit where the stem attaches (if present.)
With a sharp knife slice into the avocado until you hit the pit.
Rotate the Avocado to slice around the pit until you get back to the starting point (and remove the knife.)
Twist the two halves to separate them. The pit will stick in one half.
Chop the pit with the knife (but not enough to cut it in half!) Twist to remove the pit.
Or just search Youtube for "pit avocado Martha Stewart" who demonstrates this better than I can explain it in about 15s.