Use "in." A country is located in a continent, just as a city is in a state or a room is in a building. Continents are treated as bounded regions containing political entities.
Examples:
"On" applies to islands (on Iceland, on Madagascar) or specific landforms (on the continent of Antarctica—though "in Antarctica" is also standard). The distinction mirrors "in a forest" vs. "on an island": containment vs. surface contact.