I run hot water through my lines after every keg, but since I always hookup another keg immediately, I only clean the lines with starsan after 3-4 kegs. It's not even needed to clean them that much unless you have a very potent beer on followed by a light one. Since there's no oxygen in the lines, you have no risk for infection.
Sudndeth, if you do infact have an infection, you need to replace anything plastic that the beer touched. Lines, keg o-rings, possibly your racking equipment and fermentor that was used. You'll find out pretty quickly if your next batch goes sour. Then you know you need to replace stuff. Stainless and glass don't need to be replaced.