In most events, if a tie occurs, multiple medals will be given for whichever place was tied. For instance, if two people tie for the gold medal, two gold medals will be awarded, plus a bronze. No silver medal is awarded. When two people tie for a silver, a gold, two silvers and a bronze are awarded. And in the event of a tie for third place, a gold, a silver and two bronzes are awarded.
Unlike most Olympic sports, gymnastics doesn't offer multiple medals for tie scores. Nastia Liukin found that out the hard way in the 2008 Beijing Olympics. After her routine, she had a tie score with Chinese gymnast He Kexin. The tiebreaker in gymnastics is to calculate the average in deductions for each competitor. Nastia Liukin lost by a margin of 0.033, leaving her with the silver medal.
There are never ties in baseball--the extra innings could technically go on for eternity. In order to make sure that doesn't happen, the Olympics initiated a rule in the 2008 Beijing Olympics. After the game reaches the eleventh inning, each team automatically gets runners on first and second, and they can bat whoever they like in whatever order they choose. This should quickly break the tie.
In the 2000 Olympics, Gary Hall, Jr. and Anthony Ervin competed in the men's 50 m freestyle swim race, and both happened to finish at exactly 21.98 seconds. In this event, no silver medal was awarded--Gary and Anthony both shared the first place podium, and each was awarded a gold medal.
The 1896 Olympics
In the first Olympics in 1896, held in Athens, three ties took place. All three were for the bronze medal. Alajos Szokoly and Frank Lane, Evangelos Damaskos and Ioannis Theodoropoulos and Konstantinos Paspatis and Momcsilló Tapavicza tied in their respective events and received bronze medals.
In the event of a tie, no matter what medals were awarded, they will count for their country. For example: in the 2000 Sydney games, when Gary Hall and Anthony Ervin both won gold medals, they both competed for the U.S., and therefore the U.S. received two gold medals. In the instance with Alajos Szokoly and Frank Lane, Alajos Szokoly won a bronze medal for Hungary, while Frank Lane won a bronze medal for the U.S. Both medals counted for the countries' cumulative medal counts.