OSM has not defined what the continents are in its tagging structure.
In OSM the top level administrative boundaries are for countries, rather than continents. There is a capacity in the administrative tagging structure for defining administrative regions above the level of a country but this has not been done so far. Also, there is more than one view of what constitutes a continent. what you mean by a continent may depend on what geophysical, geopolitical or geo-demographic model of the world you are using. Does your view of the world have 4, 5, 6, 7 (or more) regions that you would call a continent, and if so, do these align with the commonly accepted regions of the world that might be called continents? Opinions differ and there is no definitive standard.
So you will need to create a proxy structure that is probably based on various administrative levels for countries, territories and states. While most countries are likely to be confined to a single continent, some countries, such as the USA, UK, France, and Russia have territorial claims across several continents, including Antarctica, so you may need to determine which part of a country a geo-location is in before determining its continent. You may wish to use ISO 3166-1 to classify your geo-locations by country code and then group these codes by continent.
answered 25 Apr, 02:07