Consider the Gibbs equation:
$$du=Tds-pdv$$
Identifying partial derivatives, one obtains:
$$-p=\left( \frac{\partial u}{\partial v} \right)_T$$
But you can also show that:
$$p=T\left( \frac{\partial s}{\partial v}\right)_T -\left( \frac{\partial u}{\partial v} \right)_T $$
In fact for an ideal gas, the latter partial derivative is $0$ and therefore it is the first term the one that determines its pressure. But how come both of these equations are true, at the same time?