Halley's comet takes 76 years to pass by Earth. This comet is an example of a short-period comet, one whose orbit is influenced by the gravities of the outer planets of the solar system and so usually stays within the area of the planets.
Halley's comet comes as close to the sun as 88 million kilometers, which is closer than the orbit of Earth. Its farthest distance from the sun is 5.2 billion kilometers, which reaches even beyond the orbit of Neptune.
Edmund Halley used Isaac Newton's theory of gravitation to conclude that the comets that made appearances in 1531, 1607 and 1682 were actually the same comet. He then used the theory to predict that this same comet would appear again in 1742, and it did, although Halley did not live to see the comet's reappearance.