The 12-hour clock is a timekeeping convention in which the 24 hours of the day are divided into two periods called ante meridiem (AM, Latin for "before noon") and post meridiem (PM, Latin for "after noon"). Each period consists of 12 hours numbered 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11. The AM period runs from midnight to noon, while the PM period runs from noon to midnight.
The 12-hour clock is especially common in the United States of America.
According to standards bodies such as the National Institute of Standards and Technology in the United States, noon is neither AM nor PM, because noon is neither before nor after itself. Following this logic, 12:00 AM is the midnight at the start of the day (the only 12:00 that is before noon), while 12:00 PM is the midnight at the end of the day (the only 12:00 that is after noon).
However, it is common practice in the US to interpret 12:00 PM as noon, because 12:01 PM through 12:59 PM come immediately afterwards. Even 12:00:01 PM is unambiguously one second after noon, nowhere near midnight. By either convention, 12:00 AM is the midnight at the start of the day. But even this can be confusing, because one hour after 11:00 AM is noon, not midnight.
As a result of these conflicts, many people, even many of those who use the 12-hour clock regularly, can be confused about what times "12:00 AM" and "12:00 PM" refer to. Therefore it is often clearest to simply write "noon" or "12:00 noon" for noon. But midnight remains problematic, because simply "midnight" or "12:00 midnight" could mean either the midnight at the start of the day or the midnight at the end. Some style policies suggest "12:00 N" for noon and "12:00 M" for midnight, but this conflicts with the older tradition of using "12:00 M" for noon (Latin meridiem), and "12:00 MN" for midnight (meridiem nochte).
Because of the confusion possible with midnight, some legal contracts start or end at 12:01 AM, which removes the uncertainty. Similarly, airplane and train schedules avoid midnight, using 11:59 PM for arrivals and 12:01 AM for departures. Use of the 24-hour clock avoids this problem entirely.
The initialisms "AM" and "PM" are variously written in small capitals (as here), uppercase letters ("AM" and "PM"), or lowercase letters ("am" and "pm"). Additionally, some styles use periods (full stops), especially in combination with lowercase letters (thus "a.m." and "p.m.").
Style policies typically frown on use of a preceding zero in the hour; for example, "3:52 PM" is preferred over "03:52 PM" (which may confuse some people trained to use the 24-hour clock). However, the default modes of many digital clocks fail to respect this convention.
There are symbols for "AM" (㏂ = "㏂") and "PM" (㏘ = "㏘") in Unicode.
Times of day ending in :00 minutes are typically pronounced in English as the numbered hour followed by o'clock (e.g., 10:00 ten o'clock, 2:00 two o'clock, 4:00 four o'clock etc) followed by the am or pm designator. :01 through :09 are usually pronounced as o one through o nine (though ought one through ought nine may still be in use in some Commonwealth countries. :10 through :59 are their usual number-words.
The 12-hour clock originated with the Sumerians. However, the lengths of their hours varied seasonally, always with 12 hours from dusk to dawn and 12 hours from dawn to dusk. The Romans also used a twelve-hour clock: the day was divided into twelve equal hours (of, thus, varying length throughout the year) and the night was divided into three watches. With solar time, before the advent of water clocks, there was no way to have a fixed hour.
When used by the Romans, the morning hours were originally numbered in reverse: what is now "9 am" was, for example, "3 am", or 3 hours ante meridiem.
- NIST FAQ on time (http://www.physics.nist.gov/News/Releases/questions.html)