The contents of spray paint cans are under high pressure, which is why you can't just throw them in the garbage. They could explode if submitted to heat or extreme pressure in a garbage truck. While empty cans can be disposed of in your household garbage, cans with even a small amount of paint left unused can be a safety and environmental hazard. Proper disposal of spray paint cans is important; in some places you can be fined for disposing them with your regular garbage.
Lay down several sheets of newspaper on the ground outside. Completely cover the area you will be working in.
Point the spray nozzle at the newspaper and depress the button. If no paint comes out and there isn't a hissing noise, the can is empty. Otherwise, spray the paint onto the newspaper until it's empty.
Shake the can if nothing comes out to judge whether it is empty. If you are unsure, assume there is still paint in the can.
Dispose of the completely empty cans in your regular trash.