Determine the Dependence of $S$ (Entropy) on $V$ and $T$ Why can the equation $$dS= \frac{1}{T} dU + \frac{P}{T} dV$$ be expressed as $$dS= \left. \frac{\partial S}{\partial T} \right|_V dT + \left. \frac{\partial S}{\partial V} \right|_T dV \quad?$$
 A: As Nick says, the second equation states the fact that the total differential of a two-variable function can be written as $dS(T,V) = \frac{\partial S}{\partial T}dT + \frac{\partial S}{\partial V}dV$.
The first equation is the fundamental thermodynamic relation for a closed system (can exchange heat but no diffusion of particles): $dU = TdS - PdV$. If the process is reversible , $TdS$ equals $\delta Q$ (heat) and $-PdV = dW$ (mechanical work). If the process is not reversible $TdS > \delta Q$ and so on but the fundamental relation still holds; U,S, and V are state variables and does not depend on the thermodynamic path the process takes on. The fact that the total differential dU can be written as above can be understood as a mathematical fact independent of reversibility. 
But I haven't got to the main point of your question yet: why do we sometimes write S as S(U,V) and other times as S(T,V)? This has to do with Legendre transform. Wikipedia has a nice article on it with a sub-entry dedicated to thermodynamics so I'll end my answer here. 
A: Both equations arise from the fact that any function of two or more variables can be written in terms of its total differential. I'll start by writing your second equation in a slightly different notation:
$$
dS(T,V) = \frac{\partial S(T,V)}{\partial T}dT + \frac{\partial S(T,V)}{\partial V}dV
$$
Here, instead of writing a vertical bar to indicate which variable gets held constant, I've just made it explicit that $S$ is a function of $T$ and $V$, so when you take the partial derivative with respect to one, you have to hold the other one constant. For some reason you won't find this notation in many thermodynamics texts, but it should be pretty familiar to anyone who's studied multivariate calculus in the context of mathematics.
As I said, any function can be written this way. So if we have a function $x(a,b,c)$, we could write
$$
dx(a,b,c) = \frac{\partial x(a,b,c)}{\partial a} da +  \frac{\partial x(a,b,c)}{\partial b} db +  \frac{\partial x(a,b,c)}{\partial c} dc,
$$
and so on. 
In particular, we could consider the function $S(U,V)$. This $S$ is the entropy of the same system we were considering before, but now we think of it as a function of $U$ and $V$ instead of $T$ and $V$. So if we write its total differential we will get
$$
dS(U,V) = \frac{\partial S(U,V)}{\partial U}dU + \frac{\partial S(T,V)}{\partial V}dV.
$$
This is actually the first equation from your post. It happens that $T$ is defined such that 
$$
\frac{1}{T} = \frac{\partial S(U,V)}{\partial U}
$$
(or $
\left. \frac{\partial S}{\partial U}\right|_V
$
in physics notation), and $p$ is defined so that 
$$
\frac{p}{T} = \frac{\partial S(U,V)}{\partial V}.
$$
This means we can write this equation as
$$
dS(U,V) = \frac{1}{T}dU + \frac{p}{T}dV
$$
instead.
So both equations are just ways to write the same quantity, $S$, as functions of different sets of variables.
A: First I assume that we are working with an ideal gas. From the thermodynamic relation for the internal energy 
$dU=TdS-PdV$
we get
$TdS=dU+PdV$
For an ideal gas $dU=C_{v}dT$, thus 
$TdS=C_{v}dT+PdV\Rightarrow dS=\frac{C_{v}}{T}dT+\frac{P}{T}dV$   $(1)$
Since $dS$ is an exact differential of a well defined state function $S$ you can make the following identification
$\frac{C_v}{T}= \frac{\partial S}{\partial T}  $ and $\frac{P}{T}=\frac{\partial S}{\partial V}$
As to why you write the entropy is such a manner, you can view $(1)$ as relating fractional change in temperature to the fractional change in volume with scale factors $C_v$ and $P/T$. Using the equation of state for an ideal gas $PV=RT$ and integrating $(1)$ between two states $(T_1,V_1)\rightarrow(T_2,V_2)$ you get
$\Delta S=C_vln(\frac{T_2}{T_1})+Rln(\frac{V_2}{V1})$
This gives you the change in entropy in terms of temperature and volume. 
As for why this is possible you should look up the theory of legendre transformation and theory of convex functions. 
