Where and how do line attenuators work?
Assuming that you are talking about 'in-line attenuators' you place them either at the source input of your pre-amp or the input of your amp which ever works best for you.
why would you want to do that instead of turning down the preamp?
If you have too much gain in your system you may not have good contol of the volume with the volume control. Small movements of the volume control yield dramatic changes in volume.
are you referring to gain attenuators or frequency attenuators ?
In general, a line attenuator is used in the pro world, such as to attenuate the output of an electric guitar, microphone, etc. They are usually a little box with specific inputs that pro gear uses and incorporates a volume control. Not usually used in high-end audio applications.