Rain gardens are designed to capture and absorb rainwater, reducing runoff and filtering pollutants. They are planted with native vegetation that can tolerate varying water levels and are built to have a shallow depth, allowing water to infiltrate into the ground. Rain gardens are an effective method for stormwater management and can improve water quality in urban areas.