(covers information from several alternate timelines)
USS was a prefix used before the names of sea-faring ships or space-faring starships. The prefix was used in the United States, the United Earth and the United Federation of Planets registry. The designation was first used on Earth.
As shorthand for "United States Ship," the US Navy used the USS prefix on the hulls of various sea ships and aircraft carriers, including:
The United Earth Starfleet used the "USS" designation on certain computer graphics for Template:ShipClass starships, such as the Enterprise NX-01 and the Columbia NX-02. However, they did not label the hulls of the starships and the ships were not commonly addressed with the prefix. (ENT: "Divergence")
The Federation Starfleet used the "USS" prefix on the hulls of their starships and as part of a starship's title. USS was referred to as standing for either "United Space Ship" (TOS: "The Cage", "The Menagerie, Part I", "Space Seed", "The Gamesters of Triskelion", "Patterns of Force", and more) or "United Star Ship." (TOS: "The Squire of Gothos", "Court Martial") This designation was used as early as 2167 on the Template:ShipClass starship, the USS Essex. (TNG: "Power Play")
The use of USS for Earth starships was first shown in Star Trek: The Motion Picture in the drawing of the USS Enterprise (XCV 330) on display in the recreation deck of the refitted USS Enterprise NCC-1701.
Shortly before Star Trek: Enterprise began its initial airing, Rick Berman implied that Enterprise NX-01 was purposefully without the "USS" prefix because it wasn't a Federation starship. (Star Trek: Communicator issue 134, p. 13) The use of USS by Starfleet before the formation of the Federation was only seen on a computer graphic in the Enterprise episode "Divergence". This graphic had both the Enterprise and the Columbia designated with the USS prefix, which may have been a mistake on the part of the graphics designers, as neither ships' hull designation used "USS".