When leaks occur in a basement wall, they are generally caused by moisture in the surrounding soil or standing water against the building's foundation. These leaks should be largely prevented by the waterproofing done to the exterior of the walls when the foundation was put into place. That doesn't mean that you have to repair the problem from the exterior of the wall though. You can repair rain leaks in a basement wall by filling any holes or cracks with leveling compound and then waterproofing the inside of the wall by spreading waterproof sealant over the wall's surface just as you would with paint.
If the leaks on the wall inside a building are coming from the ceiling, the issue may not be with the walls at all, but with the roof. When this is the case, you must repair the roof before attempting to repair the appearance of the wall. Repairing roof leaks requires removal of the shingles or shakes on the roof, replacement of any water-damaged boards in the subroof below the shingles and reinstallation of the shingles. A simpler temporary fix can be done by placing a piece of metal flashing over the leaking section of the roof and sealing it with roofing cement.
When rain leaks appear on a drywall wall, you may be able to cover the damaged section of the wall with paint. With extensive leaks though, the structure of the wall could be damaged so badly that you must remove and replace the water-damaged portion of the wall. Drywall sections can be replaced by cutting away the section of the wall with a utility knife or pointed saw and replacing the section with a new piece of drywall.
Before attempting to repair any area of the wall that has a leak or water damage, you must find the source of the leak and make the necessary repairs. Common leak sources include the gutters of the building, which may be backed up with debris, the downspout attached to the gutters, which may accidentally be turned toward the building's foundation, interior plumbing and missing or broken roofing or siding. It's essential to make these exterior repairs before repairing the wall, or the leak is likely to reoccur.