The president of the united states is elected by the electoral college, which is composed of representatives from each state, based on the popular vote in each state.