The objective of Texas hold 'em is to win pots - which is the sum of the money bet by the players over the space of one hand.

A pot is won either at the showdown by forming a five card poker hand out of the seven cards available and having a better hand than anyone else, or by causing all the other players to fold and abandon their claim to the pot (by aggressive betting)
