If a spacecraft follows literally the exact orbit of Earth at a different speed to Earth then why doesn't it hit Earth at some point? I'm specifically thinking about this in relation to these spacecraft but I'm also interested in it more generally: STEREO, 2006, https://en.wikipedia.org/wiki/STEREO Helios, 1974, https://en.wikipedia.org/wiki/Helios_(spacecraft) Thanks :)
An orbit is defined by an instantaneous position and velocity. An object in the same position as Earth but with a different velocity does not have the "exact same orbit" as Earth. The STEREO probes were designed to pull ahead or fall behind Earth, so clearly they do not match Earth's velocity exactly. They therefore do not share the exact same orbit as Earth.
Treating Earth's orbit as a perfect circle, it is defined by a radius of 1 AU and an orbital speed of 29.8 km/s. It is not possible to have a circular orbit around the Sun at a radius of 1 AU with a speed anything other than 29.8 km/s. If you accelerate in the direction of travel your orbit will get larger, and if you decelerate, your orbit will become smaller. A spacecraft cannot speed up or slow down and maintain the same orbit like a car changing speed on a circular track. If two objects share the same orbit, they must have the same velocity at the same positions - it's not possible for a satellite to "rear end" another by having the same orbit but different velocities (like two cars on a circular track moving at different speeds). If the velocities are different, so are the orbits (if the cars are moving at different speeds, they cannot be on the same track).
The only way objects with different orbits can collide is if the orbits actually cross one another, and the objects happen to be in the same place at the same time. Given the vastness of space, this is extremely unlikely, and can be actively avoided through proper planning and maneuvering. If two objects really do share the exact same orbit, they must be moving at the same speeds at the same positions, and have an average relative velocity of zero - they will never collide.
While other answers are not wrong, what still needs to be mentioned is Lagrange Points. These points are invoked when considering the 3 body problem. One example of such system is the Sun-Earth-JWST (L2 point). Another could be Earth-Moon-some Radio Telescope.
The interaction forces from two massive bodies causes a few points in space where these forces form a valley (L4, and L5) or a saddle point (L1, L2, L3). The valleys of larger planets are where we observe collection of space rocks and dust (Jupiter with its Trojans). No energy is required to stay inside this valley. These points act like virtual masses that other objects can orbit. The saddles are semi-stable points where over time, drift would still lead to a divergent orbit, but only small corrections are needed to maintain stable orbit around that Lagrange point.
Therefore, objects placed on L4 and L5 would never hit the Earth, even though they would share the same orbital path.
Whats missing in other answers, is that a specific orbit, also requires a specific speed
You cant have just any speed in any orbit. If your objects orbital speed is too high (or low) to maintain its current orbit, then it will drift to an orbit with a (larger/smaller) average distance, where that speed allows it to remain in orbit. The new orbit will have a different eccentricity, as well, seeeing as it evolved out of an inward/outward drift.
So if an object is in earths orbit, it will have the same speed as earth, not be faster or slower.
I want to clarify the difference between this and Nuclear Hoagie's answer, which states that "An orbit is defined by a position and velocity". That answer suggests you get a free choice of both, independent of each other. Thats not actually the case. It's more like, the orbital velocity is a requirement of what it takes, to be in orbit at a given (mean/average) distance.
Once you specify the Sun's mass, and the mean/average orbit distance from the Sun, that sets the speed you have to be orbiting for an orbit to not just become a spiral in or out. Similarly, once you specify the Sun's mass and an orbital speed, that sets the mean/average distance your object will orbit at.
There's 2 cautions on that, however:
Orbits arent usually circular (although often close to it)
Orbits are almost always elliptical. So an object following "exactly" another object's orbit would have to be in the same ellipse, too. Not just same speed and distance. That said, inner planet orbits are usually close enough to elliptical for this to be a minor technicality.
What this does mean, is that there will also be many ellipses (technically an infinite number) that can be orbits at a given orbital speed. So a more thorough answer is that, if you pick any 3 of the 4 out of mean/average orbital speed, eccentricity of the ellipse, size of ellipse, and the mass of the central body (eg our Sun), there will always be a way to choose the 4th that would be a valid orbit.
2 objects in the same/similar/close orbits,or which come close, will affect each others orbits
So 2 objects in the same orbit or close to each other may attract and over time alter orbits and collide (earth/moon formation), modify each others orbits (Uranus/Neptune/Pluto), or prevent planetary formation (?asteroid belt)
Also be aware objects in orbit precess (the ellipse gradually moves around). This was famously used as a test of General Relativity.
Theoretically, an object in a solar orbit identical to the earth's is either leading or lagging the earth on the same orbital path. Hence there will be no collision.
In reality, small variations in orbital parameters between the object and earth may cause a collision eventually.
There are examples of this in around Jupiter and/or Saturn; I forget the names.
Two bodies in the "same" orbit will attract each other over time, and as they get closer the leading one is slowing down and the trailing one is speeding up, thus, they are now in slightly different orbits. They switch places as the trailing one passes -- the change in speed also causes them to raise/lower so they don't crash into each other.
Then the process begins again.
More generally, with one body much larger than the other, this results in the tiny one moving back and forth along the shared orbit, appearing to an observer on the larger body to be going in a horse-shoe shape.
Thanks to Ramon Snir for finding Co-orbital Configuration in Wikipedia, which describes both of these cases.