Serious question: How did Obama get voted in twice and yet the same voters went for trump in 2016?

I don’t get it? They voted for Obama, a liberal, and then voted for trump, a man who wants to burn everything Obama did to the ground

Edit: I see people saying “it was a backlash against Obama being black” and then a conservative responded “if these voters were so racist, why did they vote twice for Obama?”