Andromeda was the daughter of Cepheus and Cassiopeia. Mother thought she and daughter were more beautiful than any of Poseidon's many nymphs, and she taunted the God of the Seas until he just couldn't take it any longer. Poseidon punished the vain mother by chaining her daughter to a rock, to be sacrificed to a dreadful sea monster.
Perseus, fresh from slaying the Gorgon Medusa, was passing by. Attracted by Andromeda's beauty, and no doubt the generally heroic opportunities the situation offered, he agreed to rescue her. But only if he could marry Andromeda afterwards.
Cepheus and Cassiopeia were not anxious for their daughter to wed Perseus, but they had little choice, so agreed. Perseus skimmed over the water, thus confusing the monster, and then cut off the monster's head. The wedding followed soon afterwards.
At the wedding, relatives distrupted the proceedings, probably at Cassiopeia's insistence. In the following melee both Cassiopeia and Cepheus lost their lives. Poseidon put them both in the heavens (well, it was the least he could do...).
Much later Athena put Andromeda in the same region of the sky, between her mother and father.
Gemini, the Twins, are really only half-brothers. They share the same mother (Leda) but have different fathers. Castor's father was a king of Sparta, Tyndareus - who would be chased from his throne but later rescued by Hercules (who nevertheless wound up killing him).
The father of Pollux was none other than Zeus, or Jupiter. Zeus visited Leda on her wedding night in the guise of a swan. Thus the twins would be born.
It should be said, however, that Pollux had a sister as well by Leda and Zeus: the beautiful Helen, who would become Queen of Sparta, and whose abduction by Paris would lead to the Trojan War.
Castor was a great horseman and fighter. One of his pupils was Hercules. Like Hercules, both Castor and Pollux would become Argonauts, that is, join Jason in his quest for the golden fleece.
The twins spent their time raiding cattle and abducting young women, as Greek gods were wont to do. During one such cattle raid a cousin (Idas) became enraged at Castor and killed him. Zeus threw a thunderbolt at Idas, killing him instantly.
Since Pollux was the son of Zeus, he was immortal. But Pollux mourned over his brother's loss to such a point that he wanted to follow Castor into Hades. Zeus was so stricken by Pollux's love for his brother, he allowed them both to share Hades and Olympus, (on alternate days). Later Greek writers had Zeus place the two in the heavens side by side.