It was designed by Nicola Salvi and finished by Giuseppe Pannini in 1762, then inaugurated by Pope Clement XIII. The name goes back to the Latin trivium, a meeting of three streets: the fountain sits at the junction of Via Poli, Via Delle Muratte and Via De' Crocicchi.

The fountain is the showpiece end of the Acqua Vergine, the revived form of the Aqua Virgo, an aqueduct that supplied ancient Rome. In 19 BC Roman engineers found a spring of clean water some 13 km from the city, reportedly guided by a young girl, and the channel first ran to the Baths of Agrippa. Though damaged when the Goths of Vitiges besieged Rome in 537, it stayed in service through the Middle Ages and still brings water to the fountain.

Getting the fountain built took more than a century of false starts. In 1629 Pope Urban VIII asked Gian Lorenzo Bernini for designs, but the scheme died with the pope. A contest called by Pope Clement XII in 1730 first went to the Florentine Alessandro Galilei; after protests in Rome the job passed to Salvi, and work started in 1732. Salvi built the fountain against the back of an existing palace, the Palazzo Poli, and died in 1751 with only half of it done. Four sculptors finished the decoration: Pietro Bracci, who made the central Oceanus, along with Giovanni Grossi, Andrea Bergondi and Filippo della Valle.

The theme is water brought under control. At the centre, framed by a triumphal arch set against the palazzo front, the figure of Oceanus stands on a shell chariot drawn by hippocamps that Tritons are struggling to tame, one horse calm and the other restless. The niches at his sides hold Abundance pouring water from an urn and Salubrity with a cup from which a snake drinks, and reliefs above them show the Roman origins of the aqueduct, including the scene of the spring being found. Off to one side, a carved vase that Romans call the "Ace of Cups" was put there by Salvi to hide a barber's sign.

The fountain's best-known custom is tossing a coin over the left shoulder with the right hand, back turned to the water, which is said to ensure a return to Rome. The coins are collected and given to the Caritas charity, and taking them is illegal. The fountain has appeared in films such as Roman Holiday, Three Coins in the Fountain and Federico Fellini's La Dolce Vita, in which Anita Ekberg wades into the basin with Marcello Mastroianni. A cleaning financed by Fendi, finished in November 2015, added more than 100 LED lights for the night illumination.