Hello Amy, you will need to provide more information for any of us to find the problem.
Your tank size?
How many fish? (what species? list them all if goldfish are not the only species)
What filter system?
How much and how often do you feed?
How often and how much water do you change as a part of regular maintenance?
Some things you need to know.
1. Goldfish require large tanks because not only they can become very big, they are also known for being messy.
They need minimal 20~40 gallon of water (each) depends on if they are fancy goldfish or common goldfish.
Undersized tank will always be messy no matter what you do.
2. Messy tank is also often a result of overfeeding. You don't need to feed more than once a day, and as much as the fish can finish within a minute. No leftover fish food should be visible in the tank, or you need to immediately remove them.
3. Filter or the filter media should not be replaced unless absolutely necessary. They also should not be washed under untreated tap water, because chloride will kill the good bacteria in the filter media necessary for the nitrogen cycle.
4. Weekly partial water change should be done along with vacuuming of the substrate as a part of the regular maintenance.