We studied the orbital evolution of objects with initial orbits close to those of Jupiter-family comets (JFCs), Halley-type comets (HTCs), and long-period comets, and the probabilities of their collisions with the planets. In our runs the probability of a collision of one object with the Earth could be greater than the sum of probabilities for thousands of other objects. Even without the contribution of such a few objects, the probability of a collision of a former JFC with the Earth during the dynamical lifetime of the comet was greater than 4×10−6. This probability is enough for delivery of all the water to Earth's oceans during the formation of the giant planets. The ratios of probabilities of collisions of JFCs and HTCs with Venus and Mars to the mass of the planet usually were not smaller than that with Earth. Among 30,000 considered objects with initial orbits close to those of JFCs, a few objects got Earth-crossing orbits with semimajor axes a<2 AU and aphelion distances Q<4.2 AU, or even got inner-Earth (Q<0.983 AU), Aten, or typical asteroidal orbits, and moved in such orbits for more than 1 Myr (up to tens or even hundreds of Myr). From a dynamical point of view, the fraction of extinct comets among near-Earth objects can exceed several tens of percent, but, probably, many extinct comets disintegrated into mini-comets and dust during a smaller part of their dynamical lifetimes.