An election is a vote which determines which candidate is placed in office.
Most elections in the United States and many other countries are based on a popular vote in which whoever gets the most votes in the election, which is called a plurality, is declared the winner. This is sometimes known as "first past the post" voting.
An alternative method is to require a candidate to get a majority; if no one gets a majority, the two top vote-getters will have a run-off election, and whoever gets more votes in the run-off is the winner. Another method is "mixed member proportional" where by voters can elect the preferred leader (and associated party) but also vote for which party represents their district in government. This creates a situation where the party with the largest share of the vote must get support from smaller parties in order to gain a majority.
Another alternative, used for most elections in Australia, is preferential voting, in which voters put a number against each candidate on their ballot paper, in their order of preference. If the candidate with the most votes doesn't have a clear majority (i.e. more than 50% of the votes), then the candidate with the least votes is eliminated and the second preference of all the voters who voted for that candidate are counted. This continues until one candidate has more than 50% of the votes. In the U.S. this is referred to as "instant run-off voting", but is not used widely.
Another sort of election is the Electoral College, used to select the U.S. president every 4 years. Each state gets a certain number of electors. All of a state's electors are assigned to whichever presidential candidate gets the most votes in that state. In all but a few instances, the candidate who gets the most Electoral College votes has also gotten the most popular votes.