If a device has a gain less than 1, we may call it attenuator. In low power and fix attenuation value, we use something like a resistors network to form it.
In the case, we need a high power or using in an Auto Gain Control circuit, sometime we need a variable attenuator. This type of attenuator we always use the active component to build it. It use the same technique as the amplifier to build it.
Expecially in RF circuit, we can find a lot of attenuators with FET inside.