A Crew Optical Alignment Sight would have been used in two places during an
Apollo lunar mission: One would be present in the command module, used to
align with the lunar module during transposition, docking, and extraction
(removing the lunar module from the spacecraft/lunar module adapter
(SLA)) and one could be placed in the lunar module overhead docking
window during rendezvous and used by the commander to help align the LM
for docking with the command module.
The Apollo Lunar
Surface Journal does a much better job of explaining the
function of the COAS than I ever could, so I'll just leave it at that.