From the official website of the most recent Games (Rio 2016) (emphasis added):
Five judges score both fighters after each round, but scores are not revealed until the end of the bout.
A boxer receives 10 points for winning a round, while the loser gets between six and nine.
Athletes are scored on successfully landed blows, domination, competitiveness, technique, tactics and adherence to the rules.
A computer selects the scores of three of the five judges at the end of the bout – and the final score is an average of these judges’ scores.
AIBA is the body responsible for regulations, so they give us more detail on how the system works. From their website, the relevant rules document (warning: PDF file) states in rule 3,
3.3. Just before starting each Bout, the Scoring System will randomly select three (3) Judges out of the five (5) Judges, and only the scores of these three (3) Judges will be counted.
3.4. At the end of each round, each Judge must determine the winning Boxer of that round by awarding a score of ten (10) points and by awarding nine (9) or less points - down to six (6) - to the losing Boxer, depending on the
judgment as to the degree to which the opponent lost the round. Every round must have a declared winner.
Thus, the winner of individual rounds is not of particular importance. It is their total score from a maximum of thirty points compared to the opponent, that matters.
For example, a boxer could lose two rounds by 10-9 each, and win the remaining round by 7-10. The scores are then 27-28, so the boxer wins the match even though they lost more rounds.