When changing the pressure, why does the physical state of a substance sometimes change?
Most people think of the phases of matter as being due to temperature, but that isn't quite right. They also depend upon pressure. Under the conditions we're most familiar with in daily life, temperature variations are much larger than pressure variations, so it makes sense to think of the freezing and boiling points of substances as being due to their temperature only. (Even then, try making pasta in Colorado, and you shall see that pressure does matter.)
The purpose of a phase diagram is to express this relationship in one clear graphical form; the regions of the phase diagram show what phase of matter a substance will be in given both temperature and pressure.
If you move left or right on a phase diagram, you are changing temperature while holding pressure constant. But if you move up or down on a phase diagram, you are changing pressure while holding temperature constant. (Diagonal motion changes both at once.)
Depending on what substance you're dealing with and where you are on the diagram, it is often possible to switch phases simply by moving up or down, which is to say by changing pressure. Most substances transition from gas to liquid, and then from liquid to solid, as pressure increases. Water is actually quite unusual in that it can go from gas to solid, and solid to liquid, as pressure increases---because water is unusual in that its solid form is less dense than its liquid form.