Input nodes are used to import footage into the Node Editor. Output nodes are used to export or display the result of a node graph. So, these nodes form the head and tail of the node flow drawn in Blender's node graph UI.
Input nodes are used to generate footage or to feed footage into the flow. These nodes don't have any input sockets. At any instance, there will be multiple types of inputs that a node flow might require, as shown in following screenshot and listed as follows:
A color or value
A procedurally generated pattern or texture
A rendered static or sequence of images
A movie clip
Data rendered through the active camera of the current scene