how does a telescope work wikipedia