I do not know if your physics class is with calculus or not. I will give you an answer using calculus.
You are probably already familiar with potential energy U as a function of height h:
U = mgh
But this formula is valid only for a constant acceleration of gravity g. The variation in height above the surface of the earth has to be extremely small so we can say that g ≅ constant.
In general, allowing for variability over a wide distance range, the force of gravitation between the earth M and a mass m is
F = -GMm/r2
where r is the distance between the centers of the earth and the mass m.
Since F = -∂U/∂r, and using ∞ as our reference point,
U(r) = -∫∞r F(r')dr' = -∫∞r-GMm/r'2 dr' = GMm∫dr'/r'2 U(r) = -GMm(1/r - 1/∞) = -GMm/r
So you can see that in the more general case, gravitational potential energy is negative, increases as you move away from the earth, and is zero at infinity.