A theme park is basically the same thing as an amusement park, except that usually the rides and attractions have some sort of unifying theme. For example, at Disneyland, the emphasis is on Disney cartoon characters. King's Island amusement park in Cincinnati, Ohio, is owned by Paramount Studios, so their rides and attractions feature characters from Paramount-produced cartoons and films.
At one time, amusement parks started getting a bad reputation; people associated them with carnival barkers, sideshow freaks and games of chance that were rigged so no one could win. Eventually, the emphasis was shifted to family-style entertainment, with lots of roller coasters and other thrill rides, clean facilities, and helpful employees dressed in appropriate costumes. They were called "theme parks" in order to distinguish them from the more unsavory "amusement parks."