Reading input from keyboard is analogous to downloading files from the internet, the java io system opens connections with the source of data to be read using InputStream or Reader, you have to handle a situation where the connection can break by using IOExceptions
If you want to know exactly what it means to work with InputStreams and BufferedReader this video shows it