An extension tube moves the lens further away from the camera body. In terms of physics and light this means that the projected image (coming out of the back of the lens onto the sensor) is bigger when it hits the sensor.
However there are some issues with extension tubes; some don't allow you to autofocus, some don't allow you step down the apperture and none will allow you to focus to infinity (so if you have one attached you can't then look up and take a photo of something else that's much further away without removing the tube)
This is my understanding of them, I don't know if it is 100% accurate