$S$ is the action and $L$ the Lagrangian describing some system.
The $\gamma d\tau$ seems to indicate that a single relativistic particle is being considered. (The $\gamma$ is its Lorentz factor and $\tau$ is its proper time.) More generally, there would just be a $dt$.
Requiring that the action be stationary ($\delta S=0$) under small variations of the dynamical variables in the Lagrangian leads to the Euler-Lagrange equations.
Your second equation is an example of such when the dynamical variable is a scalar field $\phi(\mathbf{x},t)$. In that case, the Lagrangian is a spatial integral over some Lagrangian density that depends on $\phi$ and its spatial and temporal derivatives.
This approach to formulating physical laws using actions and Lagrangians is used throughout physics, including quantum mechanics (including quantum field theory) and relativity (both Special and General).