The river Styx is the main river from the underworld, in Greek mythology. There is also a Greek goddess Styx, who is the goddess of this river. She was the daughter of the Titans Oceanus and Thetys. She lived in a palace at the entrance of Hades, which had rocks on the roof and was supported by silver columns. Her name is connected to the word which meant "hatred" in Greek.
When she was young, she was one of the girls who were playing with Persephone, gathering flowers, when the latter was kidnapped by Hades.
With Pallas she had four children: Nike (Victory), Zelus (Zeal), Kratos (Strength) and Bia (Force). When Zeus summoned all the gods to help him fight the Titans, Oceanus told his daughter Styx to join Zeus. That's why she was the first to come to Zeus' aid, together with her children. The Roman poet Ovid says that, during the war, goddess Styx imprisoned a monster, half bull and half serpent, because it was said that whoever fed the bull's guts to the flames will defeat the gods.
As a reward for Greek goddess' Styx help, Zeus allowed her children to dwell in his house. To her, he gave the honour of being the one on whose name the solemn oaths were taken. Whenever a god or goddess takes an oath, goddess Iris is sent to fetch water from the river Styx, in a golden pitcher/cup, and the god slowly pours out the water, while pronouncing the oath.
That's why she was feared by gods, because oaths sworn on her name could not be taken lightly. Zeus sworn on the river Styx to grant Semele whatever she wanted, that's why, when she asked him to appear in all his glory, he had to do it. He showed her the smallest of his thunder bolts and the smallest storm, but mortals can't see them without being incinerated, and so Semele died. Zeus had tried to make her change her mind, but in the end he had to comply, because he was bond by the oath on the waters of the river Styx.
Also, Zeus had a habit of swearing on the waters of the Styx, whenever he got in trouble with Hera because of his love affairs... which happened quite often!
Helios, too, sworn on this river to satisfy his son's wish. Phaeton asked to drive his father's chariot, and that's what lead to his death.
When such a solemn oath was broken, there was a severe punishment for the gods: for one year, they could not breathe and they could not feed on nectar and ambrosia, they would just lay on a bed, in a kind of coma. After that, for nine more years, they could not take part in the other activities of the gods, counsels or banquets.
As regards the river Styx, it was considered the boundary between our world and the underworld. That's why sometimes the name Styx was used instead of "Hades". It was a branch of the river Oceanus and it was said to circle the world. It was one of the five rivers of the underworld, together with Acheron, Cocytus (a branch of the Styx), Phlegethon and Lethe. While Plato described the river as having dark blue waters, the other writers described them as being black or dark.