Since there is the collision of particles against the internal surface of the container (that holds its shape), therefore there is pressure in liquids.
Because Pressure = force/area we need work out the force of a liquid first.
Force = Weight (Weight does NOT equal mass) Weight ≠ mass
Weight = Mass X gravity (g)
Mass = density (ρ) X volume
Volume = base area (A) X depth (h)
The rest really just needs a little 'alegebra' and the skill of substitution.
Mass = density (ρ) X Base area (A) X depth (h)
Weight = density (ρ) X Base area (A) X depth (h) X gravity (g)
Force = (density (ρ) X Base area (A) X depth (h) X gravity (g)) / Area (A)
Cancle out the 'area'
Density (ρ) X Gravity (g) X Depth (h)
Pressure in liquids = ρgh
g can represent two things.
More about pressure in liquids:
Picture from http://www.school-for-champions.com/science/fluid_pressure.htm
Information based on Complete Physics by Stephen Pople (Oxford University Press)