When cleaning a filter you want to keep the beneficial bacteria in the foam or on the bio wheel/bio-balls. You can change out the carbon. After a while the carbon wont be affective anymore and will need to be changed. When cleaning the foam or bio-balls, DO NOT clean them in the sink. The chlorine in your water will kill all of the beneficial bacteria that your tank uses. What you can do is use the water from your water change to clean the junk out of them. Put some of the water change water into a 5 gallon bucket and swish the foam and bio-balls in that water to get the build up off. Then they will be good to go.
Also, you should never change the bio balls, but you can put a new foam pad in every once in a while. I try to put a new one in every month-2months. Same with the carbon.