Raising in Hold 'Em

Watching poker lately, I’ve noticed situations like this:

Bet of 20k, raise to 35k.

I thought the minimum raise was 40k.

Was this pre-flop? Maybe there was a 5k blind, 15k raise, 15k re-raise.

IIRC post-flop. Also happens on turn.

That’s probably it. If the blind is 5k, and the first raise makes it 20k to go, the minimum raise is to 35k. It’s at least as much as the preceding raise, and can only be less if you are all in.

If it’s on the turn and the first bet is 20k I don’t understand how the raise can make it 35k unless it puts the player all in.

People weren’t all-in, might not be explaining right.