Fences are only as strong as their posts and can occasionally be overcome by wind and shifting soil. When your fence sags, you can take steps to shore its posts up. If a post is in good condition, it can probably be restored to like new; if not, bracing it upright until proper repairs can be made is still typically possible. You will need to be prepared to get your hands dirty. Also, recruiting a little extra muscle to prop up the fence couldn't hurt.
Examine the post to determine the nature of the problem. Fence posts will sag for any number of reasons; the three most common are the soil around the post has been dug out or washed away, the post is rotten or damaged or the concrete at the foot of the post has failed and crumbled.
Pack the dirt around the post if the post is intact but loose. Use a level to adjust the post until the bubble in the level is centred in the indicator. Use a soil tamper or another fence post dropped repeatedly on the area to pack the soil tightly.
Tilt the post to determine whether it is broken off. If the post seems to bend or move freely at ground level or above, the post is broken and should be replaced. If time or lack of resources makes replacement impossible, splint the post.
Dig down on the back side of the post 6 to 8 inches across and 18 to 24 feet deep. Cut a piece of treated 2-by-4 lumber to 48 inches in length. Stand the 2-by-4 board in the hole. Drive 3-inch treated deck screws through the 2-by-4 board into the back of the post, using two screws above the ground and two below. Set a level against the back of the post and adjust the post until the bubble is centred in the indicator. Fill the hole with dirt and pack it well.
Replace the concrete if the previous steps are not adequate. Dig out an area on all sides of the post down to a depth of 24 inches. Use a brick chisel and a 1.36kg. hammer to chip the concrete away from the base of the post. Dig all of the broken pieces out of the hole.
Add half a bag of concrete mix to the hole. Add water and mix the concrete with a scrap of lumber. Check that the post is level front to back. Adjust as needed. Fill the remainder of the hole with dirt and pack it tight to hold the post in position until the concrete hardens.