The telegraph is an electrical device used for transmitting messages over long distances using coded signals, typically in Morse code. It revolutionized communication in the 19th century, drastically reducing the time it took to send messages and transforming journalism by enabling real-time reporting of events.