Ideally you don't want to hyper-extend your back during squatting. That puts your pelvis into what's called an 'anterior tilt', and while that's better than a flexed (rounded) back, it's not the best position.
What you're after is a neutral spine, which essentially means flat with a slight natural lumbar curve.
When you're standing straight with the bar on your shoulders, squeeze your glutes and tuck your pelvis under, finding an upright position, and the neutral spine feeling. The best indicator is the glute squeeze, as it's impossible to fully contract your glutes in an anterior pelvic tilt position.
Once you have that position, sit back into the squat, pushing your butt out.