Hi Sam,
Your traveller controls the angle of your sail to the wind.
This is called the angle of attack.
Think of a plane:
If you dont pull back on the joystick, the plane will fly straight. There is enough lift to hold the plane up, but not enough lift to climb higher.
If you pull back on the joystick
a little bit, you create more lift, and the plane climbs higher.
If you pull back on the joystick
too much, you stall the airflow over the wing and the plane falls as there is no lift on the wing anymore.
Pulling on the traveller is exactly the same thing as pulling on the joystick. Imagine looking straight down from the top of the mast. Your mainsail looks exactly like, and acts like, the wing of a plane.
For the purpose of simplicity, imagine you are sailing close hauled.
If you ease the traveller to leeward, (imagine the boom is to leeward off the centre line), you create less lift/drive.
If you pull the traveller toward the middle, (imagine the boom is on the centre line), you create a lot of lift/drive.
If you pull the traveller to windward too far, (imagine the boom is to windward off the centre line), you stall the wing (sail) killing any drive.
To summarise, the traveller is your horsepower control.
The reason your boat doesn't just go sideways is because under the water, as your keel is being dragged to leeward, the flow of water over it creates exactly the same lift but in the opposite direction. The end result? Your boat goes forward!
Pulling on the mainsheet also has a little of the same effect, but your mainsheet is more to set the twist in your sail, the traveller is what controls the angle of attack.
Excuse the crappy pictures, but I hope this helps!
Cheers,
SB