He already knows I'm not from Africa.
Then why did he call you, as you said, an African kid if he knows that you aren't African?
Why if he was indeed born in Africa would that justify the teachers actions? He is clearly a racist but he tries to hide it as much as possible, I mean he is just trying not to be way too harsh with racist comments and make it sound as if he was simply "joking" but deep inside I do believe he is racist or at least disliking black people.
PS: I'm white and still I've to tell you that indeed A LOT of whites are still discriminating black people, especially rednecks. Just leave south, move somewhere else. Of course things are getting better each generation, but racism is still there and will remain for quite some time, that's why we truly need to abolish this nationalistic stupidity and try to embrace globalization. Until we understand that we're all human species and we need to stand united as humans without stupid country borders to dictate all our actions. (It's supposed to be a joke but I truly believe that this will happen only if we're invaded by another species, only then humanity will stand united).
United we stand, divided we fall
btw you experienced racism in UK?
This. It's surprising just how much racism and nationalism have in common.