How is it that it needs line power to operate.
There are different types of generators, and cogen plants frequently use "asynchronous" generators, which have simpler control requirements than synchronous generators. However, a asynchronous generator wont deliver any power if the line supply is missing; the line supply excites (or perhaps self-excites) the generator. No line supply, no excitation, no generation.
A simple cogen plant of compatible size to the installation often needs nothing more than a breaker in the panelboard to connect, and it will backfeed the 'board when its generating. However, the backfed breaker installation (in the absence of other mechanisms) can never work as a generation system in the absence of line power; you need to have transfer switch(es) or split supplies and the right type of generator.
Does it contribute to reducing electrical bill
Yes, it can, as long as you don't try to feed the grid by generating more power than you are using. If you do this then the meter may "spin backwards", but most modern meters wont do that, they only measure power you take, and thus you will get no recompense for supplied electricity. To be able to over-supply you need to have either a "net metering" arrangement, or separate metering for give and take, all set up by the utility.
However, there's not just the electricity bill to consider; under most circumstances you want to optimise the total energy bill; its not good economics to save $1 on the eleccy bill if that buck cost you $1.20 when you add up the cost of gas, plant maintenance, and equipment depreciation. Of course, on the other side you need to consider what else you get out of the cogen plant; as I noted above if you size it as though it were a boiler, then you get the heat you need, plus free electricity.
can you use it also for emergency.
Maybe, if the cogen plant supports emergency operation. As I noted above, many cogen plants just won't generate in the absence of line power. However, this setup needs more "stuff" than just backfeeding a breaker in the panelboard; you'll need either transfer switches, and probably load splitting, or a cogen system that is expressly designed to support standby operation, which will obviate the need for transfer switches, but will still need maintained and non-maintained distribution.
Its also unlikely that you'll get a no-break supply, even in the cogen is running when the utility fails; it'll take a second to sort itself out, and coming back when utility is restored is often even worse. This is because the genset controls will try to avoid backfeeding the utility any more than necessary.
And of course, with any local generation, you need to think about things like the effect on the fault current...