(covers information from several alternate timelines)
Cadet was a military training rank for students in training to become officers. The rank was somewhat similar to midshipman.
Cadet was a rank which was used at Starfleet Academy to denote students in training to become Starfleet officers. The rank was used in the mid 23rd century throughout the late 24th century. (TOS: "Whom Gods Destroy"; Star Trek V: The Final Frontier; TNG: "The Game")
Becoming a Starfleet cadet was a difficult process and required a significant amount of academic achievement while in high school. Academy entrance standards were particularly high, especially in scientific and math disciplines (such as calculus). Cadets were also expected to maintain a satisfactory grade point average during their attendance at the Academy. Getting bad grades was grounds for a cadet's revocation of appointment from the Academy, also known as "washing out". (TNG: "The First Duty", "Journey's End")
Starfleet cadets were under the same uniform code of justice as Starfleet officers and were in turn subordinate to the orders of superiors. They were also required to report violations of Federation law they observed to their superiors. Cadets were also expected to show military courtesy and respect to senior commanders. In 2370, after Wesley Crusher disrespected Commanders Data and Geordi La Forge and then further disobeyed a direct order from Captain Jean-Luc Picard, it was discussed that Wesley's appointment as a cadet might be revoked. (TNG: "Journey's End"; DS9: "Little Green Men")
In the alternate reality, the final year cadets were assigned to crew several Federation ships including the USS Enterprise. A few cadets acted as bridge crew on that ship with Cadet James Kirk being promoted to acting first officer when the captain had to leave the ship. He later became acting captain and due to his actions in the Battle of Earth, Kirk was commissioned at the rank of captain once he graduated with the cadets who had served on the Enterprise as part of his new crew. (Star Trek)
Starfleet cadets wore uniforms similar to Starfleet officers. Uniforms from the 2250s consisted of a silvery metallic shirt worn with small starburst crest. By the 2280s, cadets wore enlisted style jumpsuits with red collared undershirts.
The Bajoran Militia had some type of cadet program for those wishing to become militia officers. To become a Bajoran military officer, one first had to become a cadet at the Bajoran Military Academy. (DS9: "Meridian")
|Enlisted personnel||Commissioned officers||Generals and flag officers|
|ENS||LT JG||LT||LT CMDR||CMDR||CAPT||FCAPT||CDORE||RADM||VADM||ADM||FADM|
|2nd LT||1st LT||CAPT||MAJ||LT COL||COL||BRIG||MAJ GEN||LT GEN||GEN||MARSHAL|
|Positions:||Crewman • Technician • Chief||YMN||TAC • SO • 3rd • 2nd • 1st • CO • DD||Portmaster • Chief of Staff • CinC|
|Services:|| Andorian • Bajoran • Cardassian • Jem'Hadar • Klingon • Romulan • SS • Terran Empire Starfleet • Terran Empire MACO •|
United Earth MACO • United Earth/Federation Starfleet • United States • Vulcan
A Starfleet cadet was first seen in the original pilot episode "The Cage" as a background character in Christopher Pike's vision of an Orion bar. A cadet (albeit a recreation of one) was again seen in "Shore Leave".
In Star Trek II: The Wrath of Khan, the Starfleet Academy students were all referred to as "midshipman", however this may be explained by the students in question attending a higher level command track training where they had graduated from cadet status to become midshipmen. Several non-canon reference books, among them Star Trek: The Next Generation Officer's Manual, attempt to explain the difference between cadet and midshipman as cadet being the standard training rank while midshipman is a rank for advanced command students.
It is certainly plausible that cadet is a rank used by many other spacefaring militaries, such as the Klingon Defense Force or the Romulan military. The rank of cadet has normally only ever been mentioned (with a few exceptions) as pertaining to Starfleet personnel.