According to Baseball Almanac, there have been three triple headers played in the history of Major League Baseball.
The first one took place in Brooklyn, in in 1890. The home town Bridegrooms swept the visiting Pittsburgh Alleghenys.
The second took place in 1896 in Baltimore, and again, the home team swept the day, this time being the Louisville Colonels.
The third, and most recent triple header, was played in Pittsburgh, in 1921. The fourth place Pirates, and their 77-73 record, hosted the third place Cincinnati Reds, whose record stood at 80-69. A three game sweep by the Pirates would have pulled them within 1/2 a game of Cincinnati for third place, with a chance to catch them the next day.
But it just wasn't mean to be. Cincinnati took the first two games of the afternoon with ease, disposing of the Pirates by scores of 13-4 and 7-3. In the final game of the trifecta, the Pirates finally answered back, winning 6-0, but by then it was too late. The Reds had locked up third place, and the Pirates ended up in fourth.
No MLB triple headers have been played since, and according to Baseball Almanac, doing so is against the current CBA, so it's not likely to happen again anytime soon.
You can head over to Baseball Almanac to see the three box scores from 1921.