From UFStarfleet LCARS
Throughout its history, Starfleet has been an organization devoted to exploration and expanding the frontiers of knowledge. Its military functions are primarily defensive.
However, in the early days of Earth Starfleet the need for personnel trained in small-unit tactics for ground, starship, and station operations was highlighted.
In 2153, General Casey, at the request of Starfleet Captain Jonathan Archer, assigned a detachment of MACO troops, commanded by Major Joss Hayes, to the starship Enterprise for its mission into the Delphic Expanse.
Since the early Earth Starfleet was not a military organization, MACO troops were used to fulfill any military functions needed aboard Earth Starfleet vessels. It is unknown what happened to the MACO corps after the formation of the Federation, although they were most likely absorbed into the Federation Starfleet Marine Corps.
There were MACO posts in the city of Atlanta and the Janus loop. One of their training posts was at West Point in New York.
Although MACOs may have been assigned to serve with Starfleet, they were not part of the Starfleet chain of command, and as such did not wear Starfleet uniforms. The leader of the MACOs was General Casey, who assured Captain Jonathan Archer that the MACOs assigned to Enterprise were the finest warriors in the corps.
The MACOs operated in groups, moved in tactical "snake" formations and used hand signals and gesturing, rather than verbal communication. They normally wore grey camouflage and, when in combat, had power packs on their backs. Along with particle weapons (their primary weapons were plasma rifles), they were also expert at hand-to-hand combat.
Their Enterprise mission patch had a shark on it (possibly a play on the Mako shark.)
To understand just what MACO's were, let us begin by establishing what they were not:
It is unknown whether or not MACO's were in face representitive of some kind of United Earth Armed Forces / Defense Force. There is evidence that suggests that they may in fact have been a unit of the United States military.
MACO's have consistently demonstrated a level of competance in small-unit-tactics, close-quarters-combat, and even hand-to-hand combat that put Starfleet Security from any era to shame. Furthermore, only 3 MACO's have been verifiably killed onscreen in the two seasons they appeared.
Their motto is "Semper Invictus" (Ever Invincible), possibly based on the United States Marine Corps motto "Semper Fidelis" (Ever Faithful).