I mean there must be some program that determines the level of math equations. and there must be a physical server. So who pays for those servers and determines the equations.
There is no central authority that "determines the equations". Instead, every Bitcoin node (whether run by a big mining operation or your computer in your basement) is responsible for verifying all the work done by others. Every Bitcoin node knows and agrees upon the rules for determining what the difficulty level should be.