Paneer behaves unlike most cheeses in a pan, holding its shape at temperatures that would turn others to liquid. That comes directly from how it is coagulated.
Acid coagulation, not rennet
Adding lemon juice, vinegar or whey to hot milk lowers its acidity until casein proteins lose the surface charge keeping them apart. They clump and separate from the liquid.
Rennet-set cheeses use an enzyme that cuts a specific part of the protein instead, leaving a network that still contains calcium bridges.
Acid coagulation strips much of that calcium into the whey, and the resulting protein network cannot flow when reheated.
Why it does not melt
Melting in cheese depends on protein chains being able to slide past one another when heated, which requires the calcium linkages that acid coagulation removes.
Without them the network simply tightens as it heats, squeezing out water. Paneer therefore firms and browns rather than spreading.
That property is what allows it to be cubed into a gravy or skewered in a tandoor without disappearing.
What determines whether it turns rubbery
Overheating the milk before adding acid, or continuing to cook after the curds form, tightens the protein network too far. The result is squeaky and tough.
Adding acid slowly and stopping as soon as the whey runs clear keeps the curds tender, since the goal is a gentle separation rather than an aggressive one.
Draining is the other lever, because pressing longer and harder removes more water and produces a firmer, drier block.
Why fat content changes everything
Fat globules trapped in the curd interrupt the protein network and keep it from contracting into a dense mass. Whole milk therefore gives noticeably softer paneer.
Low-fat milk produces a block that is firmer but also chalkier, and it toughens faster in a hot pan.
Commercial paneer sold in blocks is usually pressed hard for shelf stability, which is why soaking it in warm water before cooking is a common softening step.
How the whey is used
The liquid drained off carries the milk sugar, minerals and some remaining protein. It is acidic, which makes it useful as the coagulant for the next batch.
Kitchens also use it in dough, where its acidity affects gluten, and in gravies where it replaces water without diluting flavour.
Discarding it is the common domestic practice, but it is a functional ingredient rather than a by-product.