The "United States" are a federation of regions (states) that have a certain degree of autonomy, having their own legislatures, laws, elections, courts, military, and so on that most countries of the world do not have. We might illustrate this by calling to mind the way that the general assembly of the United Nations functions.
Each of these states participates in the presidential election much like they send their own Senators and Representatives to the national Congress, rather than 535 of them being elected at-large. There is a difference between this format and the way the UN operates, however, since the electoral votes assigned to each of the states is proportional to the population (and, therefore, the voters) of each state; they do not all have the same voting power in the Electoral College.