A NRI is a person residing out of India for more than 182 days in a year.
From Trading account perspective a NRI or a Overseas Citizen of India or a Person of Indian Origin can open a Trading & Demat account to participate in Indian Secondary Market.
A NRI can invest in two modes – NRE / NRO
NRE is a type of account which allows you to remit funds from foreign country to India and take out money from India to foreign country easily while NRO allows you to freely remit money to India from foreign country but does not allow you to take money out of India except under certain situations. Its not that you cannot take it out at all. You can but with certain formalities and procedures.
To have a clear understanding of an NRI view the vedio below: