The front brake provides most of your stopping power, but often people rely on the back brake because they are scared of going over the handlebars. This means they wear out their rear brake pads much faster than their front ones. Learn good braking technique, and this ceases to be a problem!
Once you realize that you’ve worn through the pads on one wheel, it’s likely that the others are close to the end of their life too. Move the best pads to your most used brake. Be careful with some disk brake pads which are different for the left and right hand side.
Put the worn out pads back in the other brake – you will grab for them subconsciously and it’s better to have something than nothing. Metal-to-metal contact between disk brake pads and rotors will still slow you down a bit. Metal-to-metal contact with rim brakes will remind you to loosen off.
Definitely don’t leave pads out of disk brakes while you ride, as the caliper pucks will be damaged by contact with the disk rotor and may even pop out if squeezed hard. These pucks are more expensive to replace and harder to find than pads and rotors.