How does a bicycle racing team work as a team in a race, like the Tour de France?

Is it that the captain of the team gets the credit? Outside looking in there appears to be no team, or its not clear what they do for the captain to win. Do they block other riders, harass them? Up until now it seemed more like bicycle racing was an individual sport. When I learned of Lance Armstrong, that is... show more Is it that the captain of the team gets the credit? Outside looking in there appears to be no team, or its not clear what they do for the captain to win. Do they block other riders, harass them? Up until now it seemed more like bicycle racing was an individual sport. When I learned of Lance Armstrong, that is all I saw in pictures. He was the man. A country's flag would be raised Spain? Since Armstrong would be in town and he would ride his bike through as the victor. This is how the press handled it then and now. Please inform.
5 answers 5