How is eventually a nominee elected? By adding up won states or by adding up all percentages from all states?
Each state usually has a certain number of delegates. In a winner-take-all state, the candidate who wins gets all the delegates. Other states do it more proportionally by splitting delegates among those who came in highest.
The delegates matter at the party conventions. At the Republican national convention, the delegates will vote for the candidate they were earmarked for, and officially nominate that candidate that gets the most votes to run as the Republican candidate. The rest of the stuff that goes on at the conventions (speeches, baloon drops, etc.) are just for show/to promote the nominee, and to criticize his or her opponent.