"Can" and "could" (and their opposites, "can't" and "couldn't") express either possibility (e.g., "We can go to the Chinese restaurant or the Indian restaurant") or else they express ability ("He can speak German"). In your example, you are expressing possibility. If the math contest is in the future, you'd say, "He can win the math prize" (meaning that he is good at math and it is possible for him to win). For the past, you would say, "He could have won the math prize last year" (but he didn't study/was sick/got too nervous, etc.). Again, you are expressing possibility, just in the past tense, so we say "could have" plus the past participle form of the verb. Don't confuse possibility with ability: if I say, "I could ride my bike for hours when I was a teenager," we are talking about youthful ability, not possibility (that would be, e.g., "I could have ridden my bike for hours, but I got a flat tire and had to go home").