Max pain is the strike at which the largest quantity of BANK NIFTY 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 NSE BANK NIFTY 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.
BANK NIFTY tracks the most heavily traded banking stocks and moves faster than the broad market, so its option data swings harder through the session. 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 BANK NIFTY open interest and Put Call Ratio, both linked above.