I think it's obvious to most of us that your line is going to get dirty every time you fish it. Even in water that looks clean, microscopic elements build up on your line. Of course, no matter what, your line is going to need a minimal amount of maintenance if you want to extend its life. So while we may not think of it very often, it's a good idea to make sure your line is always well taken care of. Plus, a clean fly line casts a million times better tha a dirty one.
Always make sure you store your line safely. You can leave modern fly lines on their reel spools without much worry. However, don't store your line / spool next to a heat source or in direct sunlight, like on a window sill. Whatever you do, don't leave your reel & line exposed in a hot car all day, either on the dash board or on a seat. I've seen this done & nothing good for your line can come of it. Also be aware that chemicals like sun screen & bug repellent can have damaging effects on your fly line if allowed to remain in contact with the line over time.
Take time to inspect your fly line often - epsecialy if this isn't its first season. Make sure there are no dry cracks forming, or mud & / or moss etc stuck to it anywhere. This will not only hurt your line, it's not helping your reel at all either. It's not a bad idea to clean your line after every four or five outings. If you've been fishing in dirty, muddy water,or in a pond with a lot of scum than clean it after every use. It's not hard to do & won't take you long at all.
To clean your fly line simply unspool it into a basin or sink filled with warm water, laying your line in loose coils. Add a drop or two of mild dish soap - but not too much. Put your hand in the water & gently agitate the fly line & water until soap bubble begin to form on the water's surface. Then walk away & let your line soak until the water is only luke warm or even room temperature. Next, drain the water in the sink (or dump the water out of the basin) & run luke warm water over the fly line to wash away any excess soap. Now take a soft, clean cloth pinched between your thunb & fingers & pull the fly line through the cloth as you remove it from the sink. You should hear the line sqweeke a little as you're doing this. Also, if you're going to be using your line again the next day, you don't have to clean the entire line - only the length of it that you've been using, say the first 50 feet or so.
After you have the line dry & clean, then give it a good coating with a line dressing. There are many of these available on the market & I think they all work pretty well. Just follow any directions the product has.
Keeping your fly line clean & in good repair is a way to save you money in the long run. Think of all the fly lines you've owned over the years. Now, imagine how much money you might have saved if every line you've ever had would have lasted another season. I know that this is something that is often taked for granted, but keeping your line clean will help you fish better.