First off: If your lights dim and brighten, that's due to changes in voltage. To solve this requires a "power conditioner", or solving a serious problem known as a "floating neutral".
To protect against lightning or high voltage spikes, you want a "surge protector". These protect equipment from damage (the spikes can be tens of thousands of volts).
To keep computers or TV's running through brief power outages you want an "uninterruptible power supply" or UPS.
And finally you might want a "backup generator".
It's possible you want all four types of device in different places. Some devices combine more than one function. For example a good offline UPS will offer power conditioning and and surge protection, but will be limited in capacity and not suitable for the entire building.
Power does not "flow through" a whole house surge protector. One unit, costing perhaps $100, protects the entire house.
There's typically only one whole house unit made for your particular brand of main electrical service panel. Thus, choosing a whole house surge protector is easy (see a list of them over at my website http://guides.obviously.com/Whole-House-Surge-Protectors/1482 ).