The premise was that the table was square (each side the same length) and had one leg at each corner, with all legs the same length. Also, that the ground was even enough that it was always possible to have three legs touching it at all times.
Then the proof went like this: Place the table on the surface. In all likelihood, only three legs will be touching the ground, so it could wobble back and forth.
Now rotate the table 90° (in either direction) roughly around an axis passing through the centre of the table and perpendicular to it, in such a way that the legs continue to touch the ground if possible. ("Roughly" since the table might tip a bit this way and that during the rotation, as the legs follow the contour of the surface.)
After the rotation, the table will again be standing on the surface with three legs, but three different ones (if you label them ABCD and it was formerly standing with legs A[b]CD, then afterwards it might be B[c]DA).
This means that leg B, which used to be in the air, is now on the ground, and leg C, which used to be on the ground, is now in the air.
But since we posited that it's always possible to have three legs in contact with the ground, leg B must have reached the ground before leg C left it, so that means that at some point during the rotation, all four legs ABCD must have been standing on the ground at once.