For OP, yes, it is legal to earn and hold Bitcoin in most countries, however I'm not sure whether or not it is legal in your specific country. Some countries don't allow for Bitcoin to move value out of the country (Iceland is one notable example) but they allow for Bitcoin to exist within its borders, with some restrictions.
Earn, hold and exchange the BTC to your currency and send that to your bank account you have in your country. A lot can be done. Using BTC alone can be illegal. But using your own currency is not. Exchange the BTC to your currency and use them.
I can't think of any instances where the user of Bitcoin at its core is illegal, but I guess it could be a thing.