The planetary class given to Earth-like worlds with an oxygen-nitrogen atmosphere and liquid water, capable of supporting humanoid life without protective equipment, and by far the most often visited type in Star Trek.
A Class M planet is a world broadly like Earth: an oxygen-nitrogen atmosphere, moderate gravity and temperature, and surface water. Because humanoids can walk about on such a world unprotected, the phrase is the one most often heard when a starship enters orbit, and most of the inhabited planets in the franchise, among them Earth, Vulcan, Bajor and Qo'noS, fall into this class.
The term is used from the earliest episodes of The Original Series, where Spock routinely reports a planet as Class M before a landing party beams down. It recurs in every later series and in the films.
Enterprise gives the origin of the letter. In Strange New World in 2151, T'Pol describes an uninhabited world as Minshara class, a Vulcan designation that Earth's Starfleet goes on to abbreviate. Not every Class M world is welcoming: conditions can range from desert to jungle to ice.