An object will be in stable equilibrium when it returns to its original position given a small displacement. This will happen whenever a line drawn vertically down from the centre of gravity meets the ground at a point that is within the base of the object.
A body can be made more stable by lowering the centre of gravity or increasing the size of the base. This means that the object can be subjected to greater sideways forces and inclines without toppling. Many boat are made more stable by fitting additional huls on either side, lake a trimaran, which expands the base area, or by fitting a heavy keel, which lowers the centre of gravity.