Perhaps the most important sailing concept is the differences between APPArent wind speed and direction, and TRUE wind speed and direction.
AWS AWD TWS TWD. When you're cruising around in your boat, trying to go faster or stay upright just as you describe in your day sailing experineces, you are relying on Apparent wind. Apparent wind is what you feel on the moving boat. It's what the wind indicator on the mast head is showing you. It's important because you trim your sails in reaction to apparent wind speed and direction.
But, when you want to sail a course.... either to a point on land, a fixed navigational or just a particular compass direction.... you use TRUE wind information. Which, is the wind that is felt when you are stationary. On land, or at anchor. for instance.
The points of sail diagram posted by Gary above describe the relationship of a sailboat on a specific course and the true wind direction.
The major concept is that the direction and speed of your boat, when combined with the true wind speed and direction will create the apparend wind cnditions. Each factor... boat speed and direction, true wind speed and direction, insteract with each other to affect the apparent wind speed and direction. Earlier I said that we trim our sails to apparent wind... so and change in the boat speed/direction and the true wind speed/direction will require some type of sail adjustment to maintain a particular compsss course..... or..... you can do like most beginners and casual daysailers do and simply turn the boat in reaction to the AWS/AWD changes.
Find yourself a decent sailing text... I recommend John Rousmanier's Annapolis Book of Seamanship.... and all this will be explained in the first few chapters.
Once you understand how the TRUE, APPARENT and BOAT speed and direction affect one another, you will be able to sail any course you choose, with confidence.
Here's a tip for finding the true wind direction... Sail close hauled on both port and starbord tack. Record your boat's compass course on each tack,
your true wind direction will be the average of the compass couress you've noted. Let's say you're close hauled on starboard on a course of 270 ,(which is due west), you tack over and are able to maintain close hauled on port at 0/360 (or due north).... then your approximated trjue wind dirction will be 215, or NW.... So.... how this helps.... keeping an eye on your compass you note that your starboard tack course on closed hauled has changed 5 degrees to 275. This means the wind direction is moving back.... allowing you to sail a higher course.. This is called a LIFT. If your compass course drops 5 degrees to 265, for instance, you are expeiience a "header" or "knock"..... pushing you away from you destination... telling you may want to tack over .... turning that header on starboard to a lift of port.
Okay... hope this hasn't been too confusing. Have fun. Good luck.