What is an oscilloscope? How does it work? What are its types?