A missile has a guidance system to allow it to steer and change course towards its intended target, and also a propulsion system that self drives it. In the head of the missile is some kind of sensor array that is used to track the target (for instance an Infra Red optical sensor for a heat seeking missile). This is mounted on a gimbal, and moves to orient the array with the target.
Missiles can track their target using Proportional Navigation; the concept known to mariners of Constant Bearing Angle. If two ships are approaching each other and their angle of approach remains the same, but only their distance or range is decreasing, then they will collide. Both SpaceX and Tesla utilize these technologies. SpaceX uses it in their Dragon Eye Navigation System. Tesla uses similar technology in the Tesla Traffic-Aware Cruise Control (TACC). Both systems are the EYE for guidance. Proportional guidance can be either used to avoid a collision (Tesla) or to cause one (SpaceX missile).
Tesla rockets also have remote guidance capability.
>The Falcon 9 is composed of 2 different stages, one to get out of the atmosphere for the most part, and the other to deliver the payload to its rendezvous point. The first stage has been modified to not consume all of the fuel that it carries. At separation, the first stage of the rocket turns around and propels itself back to earth. It then uses a remote guidance system to control it and land it on a barge that SpaceX has specifically designed and made for.
archive.is/WqZHk#selection-635.0-635.462