Dirt will get on your line from algae that are found in the waters where you fish. Over time the dirt will get on your line and this can caused your line to become stripped down. You’ll know when your fly line is too dirty because it won’t float as well nor will it slide smoothly through the rod guides.
Cleaning your fly line is easy: use a cleaning pad that you can buy at most angling stores. Or you can also wash the fly line with a few drops of a mild soap (avoid detergents). Just rub the line gently with a damp cloth.