Apostrophes serve three functions: they form the possessive case, they indicate contractions and the omission of letters or numbers, and they can form plurals of single letters.
To indicate the possessive case, add ’s: Burt’s dog, Charles’s apple, Cleopatra’s realm. The Elements of Style suggests forming the possessive of biblical and ancient names ending in s with only an apostrophe: Jesus’, Socrates’, and Moses’ (the latter is often rewritten to avoid the apostrophe: Books of Moses). This exception is not universal—since its sixteenth edition The Chicago Manual of Style encourages the standard ’s practice (Socrates’s, Jesus’s)—and has likely given rise to the misconception that singular nouns ending in s form the possessive with only an apostrophe.
Note that according to the U.S. Board on Geographic names, most American place names do not use the possessive apostrophe on the contentious basis that the names such as Pikes Peak and Toms River should indicate a “single denotative unit,” not a possessive location. This rule has five exceptions: Martha’s Vineyard, Ike’s Point, John E’s Pond, Clark’s Mountain, and Carlos Elna’s Joshua View.
Plurals ending in s form the possessive with only an apostrophe; other plurals take ’s: guys’ night out, the geese’s flight. The same rule applies to singular mass nouns that end in a plural s: Five Guys' location, United States' role.
Except for lowercase letters, do not form plurals with an apostrophe: The 1990s were a riot, We celebrate many Christmases, I have many e’s in my name. Plurals of uppercase letters do not require an apostrophe, but using one can avoid confusion: I have two As and a B, A’s are not the most common letter (the latter can create a miscue without an apostrophe).
Contractions and letter omissions require the apostrophe: don’t, ne’er, ‘cause. Beware that certain contractions lead to easily-mistaken homonyms: its and it’s, whose and who’s, their and they’re.