Lieutenant Junior Grade, or LTJG, was the second officer rank in Starfleet.
They were normally referred to as Lieutenants, but on occasion, Lieutenant "JayJee" was used.
Barring negligent performance, they are automatically promoted to Lieutenant after three years time in rank.
They normally served as division officers or assistant department head, though smaller vessels could see them all the way up to commanding officer, such as Yorkshire class transports and Champlain landing craft.
Civilian physicians were often directly commissioned at this rank since Starfleet Medical Academy took two years for graduation.
United Federation Marine Corps
The Marine equivalent rank was called First Lieutenant, and they normally commanded a platoon or served as company's Executive Officer.
Federation Merchant Marine
Sublieutenant - Romulan Star navy, Vulcan Defense Force
Cardassian Guard - Kel