Many skegs are retractable, pulling a line near the cockpit lowers the fin into the water, which moves the centre of lateral resistance aft. One effect is to increase the boats tracking. Releasing the cord retracts the fin back into the housing and out of the water flow which, correspondingly, allows the boat to turn more easily.
However, the main purpose of moving the centre of lateral resistance forward and aft is to make it match the centre of windage. In a typical boat built to use a skeg, the natural behaviour is for the boat to weathercock when the skeg is up. With the skeg fully dropped, the stern resists more in the water, and the boat turns to face down wind - lee helm. By adjusting the amount of skeg deployed, the paddler can make the boat wind neutral at any angle to the wind and concentrate on his forward paddling.
Much the same effect can be had by adjusting the trim of the boat (moving cargo from a forward to an aft compartment is like dropping a skeg), but cannot be done whilst out on the water unless you have a sliding seat as in a Mariner kayak. For a skeg to be most effective, the trim has to be such that your boat is wind neutral with the skeg part way down - getting this right is part of the art of packing a boat.
The farther towards the stern the skeg is located, the more effective it will be. Retractable skegs are typically located 1/3rd to 1/2 of the distance from the stern to the cockpit.