How is resident/ non-resident status relevant for levy of income tax?

In case of resident individuals and companies, their global income is taxable in India. However non-residents have to pay tax only on the income earned in India or from a source/activity in India.