How to squat without feeling pain?

I experienced back pain when I was doing squats. I tried looking around the internet for solutions and tried a lot of tutorials on how to squat but my back pain is still there... I don’t really get it when Daniel and Kelli said to keep back straight.