At the national convention, each party elect his candidate who elect his VP (Vice presidential candidate)
In their state,american citizen elect the great "elector" who elect the president. The majority in each state win. Their is 538 "vois" divided in the 50 state. The number or "voice" in each state is different regarding the population (34 for the state of Texas and 3 for the state of Montana).
To become the President, a candidat must win at least 270 vote ffrom sur the "Electoral COllege) on the 538.