A junior officer was a low ranking commissioned officer, typically with the rank of no greater than lieutenant. The term was often used to refer to the early part of an officer's career when he or she had little or no command experience or department head responsibility.
Nonetheless, exceptions to this existed: an officer with the rank of lieutenant or lower was not considered a junior officer but rather a staff officer – if he or she served as a department head or other supervisory position in a particular command's senior staff. An example of this was Ensign Harry Kim, who, despite his low nominal rank, served as the chief operations officer, the operations division department head, and part of the senior staff aboard the USS Voyager. As department head, officers who would otherwise outrank him instead served under him. The same was true for (provisional) Lieutenant junior grade and Chief Engineering Officer B'Elanna Torres. (Star Trek: Voyager).
On some starships, it was common for junior officers to be assigned to shared quarters. (Star Trek VI: The Undiscovered Country; TNG: "Lower Decks"; VOY: "Flashback", "Good Shepherd") One could request a new room assignment if they were unhappy with whom they shared a room with. (TNG: "Lower Decks") Aboard other ships, such as the USS Cerritos, junior officers only had an assigned bunk in a corridor to sleep in with limited private space. (LD: "Second Contact")
Junior officers were considered among a vessel's junior staff. One illustration of the gap between senior and junior officers occurred when, on behalf of Voyager's junior staff, Ensign Jenkins thanked Harry Kim for diffusing the situation with the series 5 long-range tactical armor unit that threatened the crew – even though they both held the same nominal rank of ensign. (VOY: "Warhead")