In the U.S., in elections for the House of Representatives, each contest has a geographical district with boundaries set by state legislatures (or sometimes by independent commissions whose purpose is to avoid gerrymandering.) In most districts, the candidate with the most votes wins, even if it is only a plurality of votes. A few have other means whose purpose is to make sure the winning candidate had a majority. Because of the natural distribution of partisans and also because of gerrymandering, the number of candidates elected from a particular state often do not reflect the total number of votes cast for each party in that state.
I've heard that there is a system in place in the U.K. that avoids that outcome. Is that true? If so, how does it work? Does it mean that some candidates get elected who got fewer votes than another candidate in the same district?