It depends what you mean by the "off button".
If you mean the same front button which powers on the PC, and your PC has an ATX power supply (the industry standard since the late 1990s), then pressing this button will shutdown the PC through software, as it is designed to do, exactly as if you had shutdown using Windows.
If you mean the reset (second) front button, or the power supply switch on the back of the case, or even the power socket switch then the description given by MTIH1992 will apply.