How do refracting and reflecting telescopes work?