Bernoulli's Principal
Probably the more important factor in sailing upwind is the effect best explained by Bernoulli's Principal. The sail acts just like an airplane wing. When the wind flows over one side it fills the sail while the air flowing on the other side is moving faster and cannot push as hard and thus the sail recieves a force that is perpindicular to the direction of the wind. This would normally not push the sailboat against the wind but the keel of the boat again resists much of the lateral movement so that the boat has only one direction it can move which is forward, providing that the combined forces that are pushing the boat perpendicular to the wind are greater than the force of the wind pushing the entire boat and sails backwards.
Also note on the diagram that the vectors here are considered forces not velocites. This is important for two reaasons. One is that the drag force will increase as the velocity of the boat increases, when it becomes equal to that of the forward movement it only means that the boat cannot accelerate any further and that is the top speed. Also these forces are relatively independent of speed. The forces do increase as the velocity of the wind increases however the forward movement can become greater than the speed of the wind that is causing the boat to move!