What are nodes, and how do I use them?
Understanding of nodes

Nodes are a visual expression of mathematical operations.

The concept of nodes should help users to solve complex tasks by providing "packs" that transform inputs into outputs. In general, complex operations are splitted up into basic nodes to give the most possible freedom to the user. It's a kind of interface, which is flexible to work with and combines the best of both worlds (programming and use).

It's just a visual programming language, so in Blender it's useful for complex purposes like:

Built-in


Creating shaders for objects, world and line styles (Freestyle)
Textures
Image Compositing


Add-ons

But the range of operations they are capable to do is it is not limited to the built-in nodetree types. There are add-ons that integrate other functions like:


Parametric Modeling via Sverchok



where you can use nodes to operate with vertex/edge/faces and also manage data lists (that gives you access ...to everything!).
Node based animation via Animation Nodes


Image from http://www.blendernation.com/2015/03/17/review-animation-nodes-addon/


Node-based compositing

You are referring to Composite Node tree type in your question. From Wikipedia:


  Node-based compositing represents an entire composite as a tree graph, linking media objects and effects in a procedural map, intuitively laying out the progression from source input to final output, and is in fact the way all compositing applications internally handle composites.


Between the starting inputs (usually Render layers) and the final output image you can add nodes to: 


Tweak the brightness, 
Overlay images with alpha, 
Separate rgb channels, 
apply filters, 
etc.


Well, the list can be long and there are dozen of nodes, which can combined in infinite number of ways. The main advantage of image compositing in Blender is that it will automatically run through the node's operations after rendering the 3d image, so you'll not have to re-tweak the image manually (as Photoshop's Adjustment levels, they are operation done "after" the base image, in a non destructive way).