That depends on several factors, including the contaminant, the source, and the concentration. Some options include:
Call the EPA a safe drinking water hotline 800-426-4791
Use bottled water for drinking, cooking and brushing until the contamination is removed.
Install a filtration system certified to remove your specific contaminant.
Identify the source of the contamination.
If the source is within the home, consider replacing affected pipes and fixtures.
If the source is outside the home, contact your local water system.