Changes in the weather cause swelling and shrinking in the boards of your deck. This movement of the wood fibers causes the metal nails to pop up out of the wood. Driving them back down is only a shortterm solution because they will pop up again after a shortened period of time.
Use deck screws as a replacement after removing the popped nails for a longterm solution. The screws have a better grip on the wood fibers, making it nearly impossible for them to pop out of the boards.
Use the back of a hammer to pry up the loose nails. Choose a deck screw that is fatter than the original nail if you plan to use the same hole. If you need to make a new hole, use wood putty to seal up the old hole, to prevent water from damaging the wood.
Performing this simple maintenance measure can prolong the life of your deck, and increase the value of your home.