Short term gain tax

When the short term gain tax is deducted? At the time of selling the shares within 1 year or some other time?

You have to account for taxes on Short term capital gains when you are filing your tax returns. Read this Module on Markets and Taxation.

Chapter 4: Taxation for investors

Chapter 5: Taxation for traders.

But do read through the entire module.