Max pain is the strike at which the largest quantity of SENSEX options would expire worthless, so option buyers as a group lose the most and writers pay out the least. It is worked out from the BSE SENSEX option chain: for every candidate settlement price you total the intrinsic value owed on all in-the-money calls and puts weighted by their open interest, and the strike where that total is smallest is the max pain strike.
SENSEX is the BSE benchmark of 30 large-cap stocks, and unlike the NIFTY family its options trade on BSE rather than NSE. The level moves as open interest shifts during the day, and it is a tendency rather than a rule — a strong trend, an event or a news shock will override it. It is most useful close to expiry and read together with the SENSEX open interest and Put Call Ratio, both linked above.