You can invest in a stock market online, for which you have to open a DEMAT account with any Indian stock market broker. This DEMAT account of yours will be directly linked to your bank account, then you have to transfer money/add funds in your account according to the need of your investment and now you can invest in any stock.
Now I would like to add a few important points that one should keep in mind and learn before investing.

Like you must be knowing that to invest in any business and pull out profit out of your investment, one must have a deep researched knowledge of that particular business. Similarly, to pull out profit out of your stock market investment, you need to have a good knowledge of nature of your investment, the stock you are investing in and the market’s economic, social as well as political scenario.
Moreover before investing in stock market, two of the most important aspect of stock market needs to settle in your head with crystal clarity which are -

  1. Technical Analysis
  2. Fundamental Analysis

And the golden words are that you can not make profit without understanding two aspects.
So one needs to research before investing . Let me clarify with the help of an example -
Whenever one has to buy anything from the market, he/she go out and inquire the product’s rate from a lot of different vendors, and after a good research and collecte data of which vendor is offering most cheap rate and most favourable quality, you come up with a decision like when and from where to buy the product.
Investing in stock market exactly same like the example above.
Before investing and even thinking of making any profit, you have to research and collect data like the support level and financial condition of the particular company you are willing to invest in. You also have to analyse and recognise the market trend.
This classified research and data collection is based on technical and fundamental analysis of the company and market.
Once you have done all this you have ensured a safe and profit making investment with higher probability of success.