1st the jerseys:
There are 4 jerseys awarded throughout the tour at the end of each stage, each for a different thing.
There is the yellow jersey which is given to the man currently in 1st with the lowest cumulative time (cumulative meaning throughout all the stages done so far). This is considered the ultimate prize at the any cycling event and whoever has the yellow jersey at the end of the last day is the "winner" of the race. Once again, it is determined by a riders overall time throughout all the stages.
The polka dot jersey is given to the "king of the mountains" or the bike rider who earns the most points on the climbs throughout each stage. This (like all jerseys) is cumulative. Points are earned for being one of the first riders to go over a climb, obviously 1st gets the most points and they decrease after that. Climbs are ranked using a category system, there are 6 "levels of difficulty" of the climbs ranging from 5 (easiest) to NC or beyond category (ridiculously hard). Most points are awarded for harder climbs. More points are given for the last climb of the day then the climbs throughout the stage so its not uncommon for a rider going for the yellow jersey to score pretty well in the king of the mountains competition.
The green jersey is awarded to the fastest sprinter of the tour. Once again it is a cumulative points system much like the polka dot jersey except the points are earned at "sprint points" throughout the stage and the finish of stages. You get more points for the finish line sprint than the other sprint points.
Lastly we have the White jersey. It is exactly the same as the yellow jersey but it has an age limit. It is called the best young rider competition. Same as yellow, it is all about overall time.
Now for the teams:
Cyclists ride in teams to assist one another throughout a race and to impliment certain strategies laid out by their coaches. Most teams are built around 1 rider who is going for the yellow jersey or green jersey but some teams have a yellow jersey contender and a sprinter. The other riders in the team are called domestiques and their job is to pace their team's top riders so they don't have to work as hard and can save their energy for the sprints or final climbs. A sprint team will have other good sprinters to form a "lead out train" for their main sprinter to draft off of until he launches his final sprint. Yellow jersey condenders will usually have great climbers as their domestiques to assist them up a steep climb.
If you're still confused I can make it really simple. Drafting off of someone in front of you makes things a TON easier. Teams are there to assist their top cyclists by giving them someone to draft off of.
They usually cycle well over 100 miles every day. The longest stage this year I believe is ~136 miles. Days with multiple big climbs will usually be shorter.
The favorites for the yellow are down to Bradley Wiggins (current leader), Cadel Evans (defending champion and only 10 seconds back), Vincenzo Nibali, and Dennis Menchov.
And it is still going on, its only about 1/3 over so far.