These days, most countries are regulated. Which means an online casino can get a license to legally offer casino games. This license is usually valid in only that country. That is why online casinos often have multiple licenses so they can operate in multiple countries. But there are also casinos that focus on one specific country. If you are allowed to play in a casino, depends on the license of that casino in that country.
In most countries you have to be at least 18 years old te play online casino games.
A number of regulated countries is obligated to offer players the possibility to exclude themselves from gambling. As soon as a players excludes him/herself, he/she will be placed on a national list and therefore unable to register at any online casino.