Your profits from investments in the US stock market are covered under the DTAA or Double Tax Avoidance Agreement. This is an agreement between the Indian and US governments to ensure the same income is not taxed twice. Dividend income from US stock investments is taxed at 25% for Indians and can be claimed as Foreign Tax Credit on domestic tax fillings (through to DTAA).
While capital gains are immune from taxation in the US, in India, it attracts a 20% long-term capital gains (LTGC) tax levied on holdings of two years or more. Capital gains for a short-term holding (less than two years) are added to your annual income and taxed as per your income slab.