These Wikipedia articles explain it pretty well.
Basically, in modern times, the states (and their individual committees) determine how the democratic results of their primaries or caucuses will be appointed: different states have different rules.
For example, South Carolina has 25 delegates; two delegates will be handed out based on the winner in each of the state’s seven congressional districts and 11 delegates going to the statewide winner. So in this case, Romney actually leaves South Carolina with two delegates to Gingirch’s 23.
Other states (especially in GOP primaries) have a winner-take-all systems. Florida is like that: this year, 50 delegates will go to whomever gets the most votes.
But regardless, once the delegates are selected, they must cast their votes as directed by their state’s rules. They don’t get to change their minds… unless their candidate drops out of the contest and formally releases their delegates. Even then, their state’s rules may require them to go to a particular candidate (based on vote totals) rather than becoming “free agents” who get to wander the convention browsing the choices. And really, the GOP system is wired to overwhelmingly pick one candidate rather than allow a drawn out fight like Obama/Clinton. The nominee will be known no later than Super Tuesday, if not long before.
So could Santorum, Huntsman (he has two delegates!) or Paul “release” their delegates and instruct them to vote for one or the other candidates? Well, for some states yes… but under the current rules, no delegates can be allocated to a candidate that receives less than 15% of the statewide total… which means that the also-rans actually don’t tend to have too many to start with. It is unlikely Santorum will ever see another delegate, though Paul might if he sticks around.
Now, there ARE superdelegates that are allowed to vote as they wish at the convention. There is a small chance that the fight between Romney and Gingrich could be so close that the superdelegates can get together and “choose” the winner, but it is statistically unlikely in the GOP race.
tl;dr version: the states’ delegates are legally bound to vote for the guy who wins them; there is no hidden procedure that allows the GOP leadership to invalidate a primary and unilaterally enthrone a winner against the People’s votes.