How we change what others think, feel, believe and do
Use apostrophes to show possession, where it comes before the 's' (Sally's), except when the person's name ends in 's', when it comes after the 's' (Dickens'). It also comes after the 's' in plurals, (thus dentists' means possession by more than one dentist). A noticeable exception is its, meaning belonging to it (as it's means 'it is').
Use apostrophes to show missing letters. There are many words that are in the dictionary where letters may be omitted. Some of these are considered slang, whilst others are the main word used. For formal text, seek to avoid this form. To appear informal, make good use of such abbreviation.
Apostrophes may sometimes be used to avoid confusion, perhaps where the pronunciation without the apostrophe could be different.
James' house was next to Jane's. (possession)
The cap'n stroll'd the fo'c'sle. (missing letters)
Mind you p's and q's (avoiding confusion)
The apostrophe was not widely used until the 17th century, and the rules were not laid down until the 19th century, which perhaps explains its famous abuse from market traders who always seem to sell orange's.
Using it to replace missing letters mimics lazy speech and dialects where letters have disappeared altogether. If you want to get by in parts of London, England, omitting the 't' from the beginning and end of words (and sometimes the middle) works wonders. Righ' ma'e.