If you look in the night sky at this time of year, you might see a constellation called Cancer. To the ancient Greeks, who gave it that name, the collection of stars looked like a crab. So they gave it the Greek name for crab: carcinos.
Later, the Romans kept that name for the same constellation, but used the Latin word for crab: cancer.
Both cultures also used those words for something else: a terrible disease that formed growths as hard as crab shells inside the body, and sent spindly legs out from a central body.