From the solfege notes, created by music theorist Guido of Arezzo in the 11th century. The most accepted theory is that the syllabes themselves come from the Latin hymn Ut queant laxis:
Ut queant laxīs resonāre fībrīs
Mīra gestõrum famulī tuõrum,
Solve pollūtī labiī reātum,
Sancte Iõhannēs.
In the 1600s, Ut was changed to Do. The reason why is controversial - some sources state that it comes from Dominus - Latin for "master, lord". Others (like a page on Wikipedia) state that it was done by Italian musicologist Giovanni Battista Doni, who chose a syllable from his own family name. The fact is the change has stuck until today, probably because because "do" is an open syllable, easier to sing.
Si (allegedly based on the initials for "Sancte Iohannes" - "São João" in Portuguese) was added to complete the diatonic scale (the seven notes).
In countries with "fixed Do solfege", the solfege syllabes are used to represent the notes, instead of the letters A to G. According to Wikipedia, this includes:
Spain, Portugal, France, Italy, Belgium, Romania, Latin American countries and in French-speaking Canada as well as countries such as Bosnia and Herzegovina, Russia, Serbia, Ukraine, Georgia, Bulgaria, Greece, Albania, Macedonia, Mongolia, Iran, Lebanon, Turkey, and Israel where non-Romance languages are spoken.
Source: https://en.wikipedia.org/wiki/Solf%C3%A8ge#Origin