The fob has for separate functions.
1. Immobiliser transponder - that's a tiny chip that does not require battery power, and talks to the Electronic Ignition Switch (EIS) and allows the engine to be started when the fob is inserted into the ignition switch.
2. Emergency key - that's a mechanical key blade that can be used to unlock the driver's door or the boot/tailgate. It does not disable the alarm though, nor can it be used to start the engine. It is recommended to keep the locks lubricated, and use the key on both the driver's door and tailgate from time to time to ensure that the lock's mechanism does not seize.
3. Radio Frequency (RF) lock/unlock - these are the buttons on the fob. They should work from a reasonable distance - a hundred feet or so. If it does not work, try replacing the batteries, try the spare keyfob, or try at a different location (i.e. in case of RF interference in the area). Also, the functionality of the unlock button can be selected as either 'open all doors on first press', or 'open driver door only on first press, open all other doors on second press' (anti car-jacking).
4. Infra Red (IR) convenience closing / summer opening - if you place the small IR LED at the edge of the fob against the rectangular IR receiver of the driver's door handle, then press and hold either the lock button or the unlock button, then all the windows will open or close respectively. This feature is poorly implemented, it only works when the IR LED is in very close proximity to the receiver, and it doesn't work in bright sunlight (unless you shield it with your hand). In addition, the soldering inside the door handle have been known to fail, and then this feature won't work at all (check on YouTube how to re-solder the contacts in the IR receiver). But the first things to try is replacing the batteries, checking with the spare keyfob, and cleaning the IR LED and IR Receiver.