First, turn off the breaker that controls the circuit you are working on. If there are any other circuits in the same box as the switch, turn off those breakers as well and verify that there is no electricity running through the box with a non-contact voltage tester and by flipping the switches (lights should remain off).
Hot/black wires: take the two hot wires connected to the terminals on the switch and cap them together.
Neutral/white/gray wire: if this is a smart switch (i.e. the switch itself consumes electricity) then either cap the neutral or if it is pigtailed from the other neutrals in the box, you can remove the pigtail and recap. If this is a "dumb" switch (99% of residential switches in the USA) it does not have a neutral and nothing needs to be done.
Ground/green/bare wire: you can leave the ground wire as-is (no need to cap it). Just tuck it behind the other wires. If the box is metallic and does not have a ground wire, you can (and should) ground the box. Metal boxes should have a screw hole in the back where you can attach a ground wire and secure it to the box. This ensures that if there is a wiring fault and a hot wire energizes the box, electricity will flow to ground and trip the breaker, alerting you to the problem rather than burning the house down or zapping you if you touch the box.