Jib trim: to extend @talbot's comment:
If you pull at a flat angle (fairlead mounted high or back), you pull the foot, but the top of the sail is allowed to twist off. (The leech of the sail does not have as much tension as the foot and the wind blows the top of the sail further out). That spills wind at the top. For low wind (<6 knt true wind) the flow of the wind over the water is laminar (like a layer cake - each layer having a different speed, increasing as you go up). The apparent wind (wind as seen from the boat, including the "head wind" from the moving boat) also has the different speeds, but as the headwind component is the same, the angle of the apparent wind is different for each layer. At the bottom, the headwind dominates, and the apparent wind is more forward, so the bottom of the jib needs to be sheeted in more, at the top, the true wind dominates and the apparent wind is more aft, so a wider angle would be better. With the right twist in the jib you can trim the sail so that it has the correct angle for each layer. So: light wind, big twist.
When you are sailing in stronger winds, the flow of the wind is turbulent. Instead of a layer cake you get nearly the same wind speed at all heights. That means you want to take out the twist. You do that by pulling on the leech (i.e. pulling down), and you get that by moving your fairlead forward (or theoretically also down - except nobody mounts them that way). At the steeper angle, more of the pull is pulling at the leech and the sail resists twisting off at the top.
At yet higher winds, you can add twist again in an effort to depower the jib.
Now, for the DS you can add "barber haulers" that pull the sheet sideways (in towards the centerline). By pulling the sheet in about 9' (value from memory), you noticeably improve the pointing angle of the boat (in the middle of the wind range, >10kts, and going upwind). There should be entire threads here that discuss them.
Anyway, to know that you have a good trim, the easiest method is to by some tell-tales and stick three sets on your jib, about a foot behind the luff, and at 1/4, 1/2 and 3/4 of the height of the sail. If the twist is right, for the conditions, all three sets should fly the same.
You head into the wind until the inner one of each set starts rising up. That's the course for which the sail is trimmed. (Once you reach that point, you continue to make adjustments to your course by steering away from whichever side the tell-tales start rising up). If the boat doesn't point as high as you think it should, increase the sheet tension, (but not so hard that there's a "crease" along the bottom of the sail) or pull harder on the barber haulers (but no further than about 9').
If you don't want to sail that high on the wind, use less sheet tension and no barber hauler until the tell-tales fly on your new course. All these adjustments are usually made based on the lowest set of tell-tales.
To know that you have correct trim (correct twist), check that the upper sets work the same, if not, move the fairlead forward or back.
Don't use the barber haulers in low winds, pointing high doesn't work in those conditions.
That's about it. Somebody will be along if I forgot something.
With the tell-tales, the trick is to find the course where one or the other flies up with small deviation - if you've mis-trimmed your sail very far, you can get them both to fly, but you are spilling wind. If in doubt, head into the wind until the jib starts to luff and then fall off just a bit while watching your tell tales.
Once you've figured out how you can point the highest, ease everything off just a bit, because the DS doesn't like to point that high. If you persist, you'll just slip sideways through the water