A good question, here my attempt at an answer.
To describe a thermodynamic system, you can ask for the values of certain thermodynamic quantities:
Pressure $p$, Volume $V$, particle Number $N$, chemical potential $\mu$, temperature $T$, entropy $S$, internal energy $E$.
As it turns out, however, these quantities aren't entirely independent. For an ideal mono-atomic gas, for example, $E = 3/2 N k_B T$, so if you fix particle number $N$ and temperature $T$, the internal energy is already determined.
For a thermodynamic system, one can show that specifying three quantities is enough to determine all other quantities, and you have some freedom in which of those three quantities you specify: You could specify temperature, volume, and particle number, and that would give you every other quantity, including entropy, $S(T,V,N)$. Or you could specify temperature, pressure, and particle number, which gives you $S(T,p,N)$.
Mathematically, you go from $S(T,V,N)$ to $S(T,p,N)$ by expressing volume in terms of temperature, pressure and particle number, $V(T,p,N)$ and substituting that into $S$.
(In your example it looks like there are only two variables. If it is understood that we are looking at systems where $N$ cannot change, it is usually omitted from the function's arguments)
There is one thing to be careful about, though: For your three variables to specify the system, you can't use "conjugate" variables: You can't describe a (general) system by specifying pressure, Volume and temperature, for example, because pressure and volume are conjugate. (Note: It does work for the special case of the ideal gas because of $pV = NkT$.