'Polycephaly' is a biological condition of having two heads. Polycephaletic snakes, whilst rare, do exist but usually don't survive for very long - perhaps only a few months. Though there have been cases where snakes with two heads have lived for years in captivity.
There was a somewhat famous two headed snake, named 'We'. It was a Rat Snake owned by The World Aquarium in St Louis - where it lived to 8 years of age before dying.