A tube was a type of enclosed tunnel-like roadway.
Trans Bay Tube 2 was a tube used by Trans Francisco in the year 2024. (DS9: "Past Tense, Part I")
At least by the 2250s, tubes were used on the Golden Gate Bridge. During the 50s, they had solar panels, but they were removed by the 2270s. (Star Trek: The Motion Picture, DIS: "Such Sweet Sorrow, Part 2")
In 2372, there was a tube near Starfleet Headquarters that contained a railway for trains. (DS9: "Homefront", "Paradise Lost")
In an alternate 2404, several vehicles drove through the tubes on the Golden Gate Bridge as a crowd on the bridge walkway watch Voyager return home from the Delta Quadrant. (VOY: "Endgame")
The tubes shown on the Golden Gate Bridge seemed to be made of glass, transparent aluminum or some other see-through material. Their purpose was never made clear, but they may have been used to protect hovercars or other automobiles from the elements, such as heavy rain or other meteorological disturbances. This likely would have no longer been necessary by the 24th century, since the weather control system was firmly in place. Despite this, tubes were still being used even into the late twenty-fourth century.
The tubes were only shown in the 2001 director's edition of Star Trek: The Motion Picture, however in non-canon material, such as the novelization of the film, tubes were actually referenced.
The novel mentions that James T. Kirk took a tube from Gibraltar to a Los Angeles air tram station, where he took an air tram to Starfleet Headquarters in San Francisco.