The Earth is pulling the body with an action force mg. This force is exerted by the body on the table. In turn, the table exerts equal and opposite reaction force (-mg) on the body in the upwards direction which balances the weight of the body.