A.D. is used with dates in the current era, which is considered the era since the birth of Christ.
The counterpart to Anno Domini is B.C. for "Before Christ."
Because of A.D.'s obvious Christian overtones, many prefer to use more secular abbreviations like C.E. for "Common Era." Many lay publications, like this one, still use A.D.
Although, unlike English, Latin is not a word-order language, it is conventional in English writing for A.D. to precede the year (A.D. 2010) so that the translation, read in word order, would mean "in the year of our lord 2010". (In Latin, it wouldn't matter whether it were written A.D. 2010 or 2010 A.D.)
Note: The abbreviation a.d. may also stand for "ante diem" meaning the number of days before the kalends, nones, or ides of a Roman month. The date a.d.XIX.Kal.Feb. means 19 days before the kalends of February. Don't count on the a.d. for ante diem to be lower case. Inscriptions in Latin often appear only in capital letters.
If the terms A.D. and B.C. confuse you, think of a number line with A.D. on the plus (+) side and B.C. on minus (-) side. Unlike the number line, there is no year zero.