Was it simply a case of being able to see it and thrust in the general direction, or was there something more sophisticated at work? Was the CSM itself in a selenostationary orbit, or was it moving with respect to the lunar surface, thus making it even more difficult?
The process was a great deal more sophisticated than pointing and thrusting, and the CSM was cooking along at over 1600 m/s, circling the moon every 2 hours. Mission control, however, had fairly precise tracking of the positions of both the CSM and the landing site, and they computed the correct time of launch to begin the rendezvous.
The LM ascent stage launched initially into a 18km x 87km elliptical orbit somewhat behind the CSM, which was orbiting at 105km x 116km (a higher, slower orbit). The LM then circularized its orbit using its RCS thrusters.
I believe from this point on, Columbia could detect Eagle on rendezvous radar.
Two and a half hours later, with the LM about 72km from the CSM and approaching at 34 m/s, they did another RCS burn called "Terminal Phase Initiation" to intercept the CSM. 10 minutes after that, Armstrong was able to see the CSM. Until the ships were very close together, the maneuvering was all done under computer control using radar data; once they were close together and velocity-matched, they manually flew the approach.
All the maneuvering of the approach was done by the LM, but the CSM was at each point prepared to make the reciprocal maneuver, such that if the LM's crew, computers, or RCS failed, the CSM would have taken over as the active participant in the rendezvous.
Since the rendezvous approach plan was fairly leisurely, and the RCS thrusters capable of quite precise small adjustments, any relatively small error in the initial ascent (such as the positions of the craft, the timing of the launch, or the performance of the ascent engine) would be easily taken care of in the following maneuvers. This incremental approach is the key to any orbital rendezvous, whether in Earth orbit or lunar.