So, we live in a representative democracy, which means that there are representatives in the parliament who we voted there to run the country for our best benefit. The question is: How should voting people for parliament work?
A naive approach is to simply allow people to vote for any candidate that they want, and put a certain amount of the candidates with the most votes on parliament. This might sound like a good system at first, but in fact it really isn't. It has many problems. It may work when voting for a single person who eg. becomes the president of the country, but it doesn't really work when voting for a parliament consisting of over a hundred people. Why?
To understand why, suppose there are 100 parliament seats, and there's a "superstar" candidate who holds a certain political view, and who the majority of citizens, eg. 75%, vote for. The rest of the citizens vote for candidates who hold the opposite political view.
So now there's one representative in parliament who holds the political view supported by the majority, and 99 representatives who hold the opposing view. Obviously that political view is never going to pass any laws because it's one against 99. In other words, in this example, rather ironically, 25% of the population has more political power than the 75% who voted for that one candidate that represents their own views. This is not very good democracy.
Of course this is a very exaggerated example, but it describes well the problem with the "naive" voting system, and it is an actual problem even in actual situations. If the majority of citizens vote for a certain political view, there should be a method by which that view is represented in parliament by approximately that much. One single candidate gathering the majority of votes has, ironically, pretty much the opposite effect.
This is one of the major reasons why political parties (with more or less uniform political views within their members) exist, and why in most countries parliament seats are granted proportionally to each party, rather than blindly to the candidates with the most votes. Although this is not the only method being used.
In the countries where parliament seats are granted to political parties (rather than individuals) this may cause somewhat unintuitive situations where candidates with less votes get to parliament while other candidates with more votes might not. This even if the parliament seats are granted within a party only to those with the most votes (which is usually the case in most countries).
In the example above, if that "superstar" candidate belongs to a given party, and he (and other candidates in his party) receive 75% of the votes, this means that the party gets 75 seats in parliament. Which means that 75 members of that party go to parliament regardless of how many votes they got (yes, even if some of them didn't get any votes at all). All the other parties get the remaining 25 seats, which often leaves out candidates with more votes than those in the majority party.
Thus, if we look only at individual candidates, we may find counter-intuitive situations where some candidate got eg. 1000 votes but did not get to parliament, while another got 1 vote but got there. (This isn't even all that far-fetched, and there probably have been such situations in real life.) When examined in isolation like this, it may seem unfair, but one should understand the larger picture.
However, even this second solution may have its problems in many countries. Often the democracy system in these countries tries to make sure that different parts of the country are represented fairly. Countries are often varied in political views and needs which may vary wildly from region to region.
In the example above, it may well be that all the candidates belonging to the party of the "superstar" candidate, and who also got votes, are for example from the capital city of the country. This would mean that most or all of those 75 seats will be represented by politicians from the capital city. They might not have a high priority for other (eg. more rural) areas. They are most probably going to vote in ways that benefit the citizens living in the capital, without much thought about the other people in the country, who may have rather different needs.
Many countries try to alleviate this problem by limiting the possibility of voting for only local candidates. In other words, even if you would want to vote for that "superstar" candidate, you can't, if he doesn't happen to live in the same area as you. Instead, you are encouraged to vote for other candidates of that same party in your area. This tries to make the representatives more evenly distributed along the entire country.
Again, when examined in isolation, this can seem unfair: If there's a candidate who you agree with and who you would want to vote for, you can't. And why not? Because you just happen to live in the wrong area. When put like this, it may sound like a mockery of democracy. However, once again, there's a bigger picture at play here.
Some countries, like the United Kingdom, use even more elaborate systems. This is why you get such counter-intuitive results of, for example, the Scottish National Party receiving 1.4 million votes and getting 56 parliamentary seats, while the UKIP party got 3.7 million votes and only 1 seat. When given in isolation like this, it's very hard to comprehend how this is even possible.
A working democracy is much harder than one might naively think.