To paint a fence, prepare the surface by cleaning, sanding, and priming. Choose the appropriate paint type for the fence material, such as latex paint for wood and acrylic paint for vinyl. Apply the paint evenly with a brush or roller, and allow it to dry completely. Wear protective gear to protect against hazards like solvents and fumes. Maintain the painted fence by cleaning, touching up, and repainting as needed. Consider eco-friendly alternatives to minimize environmental impact.