Riding upwind is the key to kitesurfing. While it is theoretically possible to ride at up to a 40 degree angle to the wind, in practice with normal equipment 10 to 20 degrees upwind is achievable.
Once you can stay upwind you don't have to walk back along the beach at the end of each run (the "walk of shame") so you can keep kitesurfing in one location as long as you like.
Riding upwind in one direction, then turning around and continuing upwind is called tacking. A track log for a very short kiting session might look something like this:
To upwind, you need to combine several techniques and factors:
1. Speed. If the wind is strong enough, speed will not be a problem. In fact, you may need to slow down a little to be able to go upwind better. The faster you go the more "apparent wind" you create, which has the effect of pushing the wind window behind you, which makes it more difficult to go upwind. If the wind is light, it is a little trickier. You will need to work your kite through the window to generate enough speed. You may also need to go slightly downwind to build up speed before starting to go upwind. This will mean that you will take a large curved line to your destination where the star is your starting point
2. Edge. On a twin-tip board you must be riding on an edge - angle and steer the board in the direction you want to go, rather than letting the kite drag you directly downwind. The board will be at a 45 degree angle or greater to the water.
3. Kite position. If you are struggling, consider bringing your kite lower.
Failing to do any of these things will result in the "Walk of Shame" - the nemesis of all kiters. This basically means that you haven't been able to stay upwind, have drifted downwind as a result and have to walk back to your starting position where your gear is located.
A straight stance with hips forwards help you go upwind. Avoid crouching with both knees bent (the "poo stance").
Remember to keep your kite at about 45 degrees with the kite as de-powered as much as possible while walking along a beach - this will keep you safe if there are gusty conditions about. Having your kite high will leave you prone to wind gusts picking you up and landing you in places you don't want to be - roads, trees, backyards.
When walking on a beach keep the kite over water rather than over the beach/shore - if the wind drops the kite will land safely rather than on people or in palm trees.
When learning, its normal to go upwind easily in one direction (your "natural stance") but struggle to go upwind in the other direction (your "un-natural stance". Try getting your board speed and kite speed up first by going downwind slightly after your water start, then edge your board and bring your kite forward to go upwind.
Going upwind on a surfboard or raceboard requires a different technique: