Hope you are doing well.
If a body is placed on a horizontal surface, the torque of the contact forces about the centre of mass should be zero to maintain the equilibrium. This may happen only if the vertical line through the centre of mass cuts the base surface at a point within the contact area or the area bounded by the contact points.
Lets bisect everything one by one. First they say that if a body is placed on a horizontal surface, the torque of the contact forces about the COM should be zero to maintain equilibrium.
This is true because we know that for a body to be in rotational equilibrium, sum of all the torques must be zero, but why zero about the centre of mass?
Because if the object is not pivoted anywhere and if the forces are balanced(which is in the case it is kept on a surface) then the COM will not accelerate, that means that the axis of rotation must also pass through the COM otherwise if the axis of rotation does not pass through it then the COM must also move in a circle, meaning it will also accelerate which should not happen if there is no net force.
So there should be no torque along the axis of rotation which is through COM.
Second they say this may happen only if the vertical line through the centre of mass cuts the base surface at a point within the contact area or the area bounded by the contact points. Seems confusing?
By this they mean that a vertical line, imagine one, passing through the COM, cuts the base area, at a point where it is in contact. Why should that point of the base where vertical line from COM passes, be in contact?
Lets imagine a man of say 60kg who is holding a ball of say 120 kg in his one hand. So the COM shifts towards the ball. If you are doing this chapter then you must have done COM, and from that you know that the force of mg always passes down in a vertical line through the COM(man+ball), so there must be a normal force from the ground passing up through the leg. If the man is bent to the other side then the COM will not shift that much to the ball and so the normal force of the legs would be able to pass through the COM directly, thus balancing all the forces and also not giving it torque.
If the man is not bent then the normal force of the ground will not directly pass vertically up through the COM(man+ball) but at some side, which will give some angular acceleration to them(man+ball), so they will fall.
So the vertical line from the COM(man+ball) must pass through the base surface at a point within contact area(of legs).
In case of a hollow hemisphere placed with it diameter on a horizontal surface,
the vertical line passing through COM still passes through the area between the contact points(which form a circle) so it is stable both in rotation and translation.
For a block on the edge of a table(with friction), we can use the principle too. If we start sliding the block with our hands, slightly towards the edge, the block will not fall unless the vertical line passing through the COM does not pass through any contact point(or area between them) with the table. So that's why you must have noticed for evenly mass distributed blocks if you make them slide through an edge at some height, they will not fall unless half of the volume has already gone to the side of the edge.
But if there is a block of mass between two tables, with say, approximate 48% contact area on right table, and 48% contact area on left table, and no contact area for the 4% centre part, the block is still stable. Why? Simply because the vertical lines passing through the COM though does not directly pass through a contact point, but is still between the area of contact points of the two sides, if you join all the points with geometry.