

The USA is a union of 50 semi-independent states, not a single homogenous country, which is where most of the complexity comes from.
But, doesn’t your country (you didn’t say which it is) have any districts (or geographic subdivisions of some kind) where the inhabitants living within it send a representative to the national level to advocate for their interests and vote on national legislation with their local interests considered? That’s what we’re talking about here, except with an extra layer in between, where each State (being a semi-independent entity) gets to decide how it draws the boundaries of the districts within it.
Here, the only office not directly elected by popular vote is the US Presidential/Vice Presidential ticket, where it is determined by the infamous Electoral College, where each state has a different number of votes to cast, one for each senator and representative seat they have. Most states award all their electoral votes to the winner of the popular vote in their state, but a couple of them (Maine and Nebraska) do it differently, so sometimes the other candidate winds up getting one of their electoral votes.
All other elected offices are determined by popular vote for the seat being elected. So,
For a US Senate seat (where each Senator represents the entire state), every voter in the state votes in that race and the winner is determined by popular vote [1].
For the US House of Representatives, each state is divided into a number of districts, with the number based on the population of that state relative to the US population as a whole. So a state with a large population gets many districts and a state with a lower population gets only a few (in some cases, only one!). The voters in each district elect their representative for their own district and the winner is determined by the popular vote in that district.
[1] Before 1913, people didn’t directly elect their Senators, the state legislatures did! So we’ve at least made progress there.