Question about handicap and komi

How is komi calculated and why did i get the handicap advantage I was higher rated