Exterior iron or wood fencing deteriorates over time due to weather and landscaping that often times can encroach the fencing. It is important to fix and or replace exterior gates or fencing after being diligent in inspecting them. Keeping the fence in good working condition is important for safety reasons for children, pets and a security deterrent as well as maintaining the appearance of the home for valuation purposes.
Depending on the situation, fixing a fence usually requires replacing a post or replacing individual pickets. Tools you typically need include a shovel, pick, crowbar, hammer, drill, screws and perhaps some concrete to set a new post with.
For individual pickets, you may need to crow bar off the damage pickets. Once you have replacement pickets, use a drill and screws to reattach them. Here is a video from eHow.
For replacing a post, you usually will need to dig out the old one. This may be easy or tough depending on if there is a concrete base there. Once you dig out the old post, measure and cut your new 4 x 4 post and set it in new concrete. There are other products and methods to put in a post that you can research as well. Reattach the fence rails and the associated pickets. Here is a video from GregVan on how to do this.