The Commanding Officer, or CO, is the officer in command of an individual Starfleet command assignment. Officers with the rank of Captain or Commander usually occupy the position of Commanding Officer of standard-sized starships and minor space stations. But officers with the rank of Rear Admiral (upper\lower grade) are given the position for very large single-command assignments with a fleet captain or a captain as first officer, or officers with the rank of Lieutenant Commander are accorded the same for minor single-command assignments, such as Oberth-class starships. The Commanding Officer would be assisted by a first officer (or executive officer (acting as second-in-command)) and a Chief of the Boat (acting as the senior enlisted advisor to the CO and XO).
The CO has ultimate authority over the unit, and is usually given wide latitude to run the unit as he/she sees fit, within the bounds of Federation laws and Starfleet rules and regulations. In this respect, commanding officers have significant responsibilities, duties and powers. The CO is responsible for seeing that all missions assigned to his/her unit are carried out. He/she is the chief representative of Starfleet Command to all visiting dignitaries and while on first-contact missions. At social functions, the CO acts as the unit's host, and he presides at all ceremonies.
Administratively, the CO is the final approval authority for all policy decisions of the unit and has final approval for all promotions and transfers of personnel. The CO also must approve all official communiques sent from the unit. The Commanding Officer fights the unit in battle and sometimes delegates weapons release authority and maneuvering to the Tactical Officer and Conn Officer. It is assumed that the CO is proficient at all jobs under his command and should be able to take over for almost anyone aboard ship (with exception of the Chief Medical Officer and certain technology specialists). Most importantly, a CO is the leader of the unit and is an ideological figurehead and role model for junior officers. The CO is the ultimate authority regarding the interpretation of orders, Starfleet regulations and directives, especially the applicability of the Prime Directive.