In this section
If you are resident in the UK and have income or capital gains in another country you usually have to pay UK tax on them.
But different countries have their own tax rules and laws. When you have income and capital gains from one country and are resident in another, you may have to pay tax in both countries under their different tax laws. To help avoid being taxed twice - 'double taxation', the UK has negotiated double taxation agreements with many countries.
There is no special definition of the word 'residence' for tax. It takes its normal, everyday meaning. It is not just about how much time you spend there, but the more connections you have with foreign country the more likely you are to be its resident.
There is no minimum length of time that will make you tax resident in other country - but if you trade there for 183 days or more in a tax year, you will be resident in such country for that tax year. Generally the more time you spend in one country the more likely you are to its tax resident.