Marine Commanding Officer
The CO can range from a Second Lieutenant on a small ship to a Lieutenant Colonel on a large facility or colony. Charged with the training, condition and tactical leadership of the Marine compliment, they are a member of the senior staff.
Historically on Earth, the marine forces or marine corps have infantry forces that are part of the relevant country's navy. However, in Starfleet, the Marine Corps are their own, separate, command. However, the Marine Commanding Officer reports to the ship or facility's Commanding Officer in all situations, and reports to the ship's Chief of Security for all ship-board security matters, regardless of the ranks involved.
Tasks undertaken by marines have included assisting in the provision of security in a starship while in deep space - reflecting the pressed nature of the ships' company and the risk of mutiny. Other tasks would include boarding of vessels during combat or capture of prize ships and providing manpower for raiding ashore in support of the naval objectives. Marine elements would also contribute to any campaigns on the ground (officially termed to be 'ashore'), in support of the military objective.