Difference between two types of pressure When I first studied thermodynamics the concept of pressure was defined by means of the fundamental relation $S = S(U,V,N)$ for simple systems. The pressure was thus defined by
$$P = -\left(\dfrac{\partial U}{\partial V}\right)_S.$$
In that case we have a specific system with specific boundaries and one specific fundamental relation. We associate to it a pressure $P$ like that.
On the other hands there are many books, that talk about a body being "subject to a certain pressure".
To give some examples, I've already saying things like:


*

*Find the work done against atmospheric pressure

*An ideal gas and a copper block have same volume $V$ and temperature $T$ at atmospheric pressure

*Steam at a constant pressure is injected into a cylinder


There are many examples where in books we see mention to performing work "against a certain pressure", or that some bodies are "subject to a certain pressure".
This confuses me a lot. By the first definition of pressure, pressure is not something a system is subject to, but rather should be a property of the system. On the second example in the list for example, it is clear that the atmospheric pressure being said is not the pressure of the system as defined by equation I've mentioned.
The point is: it seems there are two kinds of pressure. The one defined by equation I've posted, the other which is this pressure systems are "subject to" and which systems "do work against".
How these two types of pressure relates? How this second kind of pressure is precisely defined and how it relates to the first one?
 A: In mechanics pressure does have a definition, $p = F/A$, force per area. 
This is meant, when you say, that a system does work against an external pressure. Than your two definitions coinside: assume a piston pressing on a gas, what work does it do? $E = F\cdot \mathrm ds$. Now insert the area: $E = F\cdot \mathrm ds = \frac F A \cdot A \mathrm ds = p\cdot\mathrm dV$.
So you see, the energy of the gas increased, and the pressure was the coefficient of proportionality between $\mathrm dE$ and $\mathrm dV$ -- which is just the definition you stated.
A: The definition of the pressure you have given is good only for the systems for which internal energy, volume and number of particles are given. All the other parameters thus can be expressed as a function of these three. Strictly speaking it is not even a definition, it is a recipe on how to measure the pressure.
In real system it might be more appropriate to select other parameters as given. In real life it  might be hard to keep volume constant and even harder to keep internal energy constant. Much more often one keeps temperature and pressure constant. In this case one is using Gibbs free energy to describe the state of the system. These are the cases which you mentioned as an example for the "second kind of pressure".
So how would you now define your pressure? Well exactly as follows from written -  pressure is something you fix in your experiment, it is force per are unit area and for creating it you can use atmosphere or weight etc. This force is equalized by the force which is exerted by your system. And if you will change this external force - your system would adjust volume and entropy to equalize the pressure.
In your first example the volume and internal energy are given by experimentalist. And if you will let say change the volume of the chamber your system will adjust it's pressure and temperature to the new value of the volume.
But it is of course the same pressure in both cases.
