The first thing to check is that the pilot flame is strong and blue, and that it engulfs the tip of the thermocouple. If this is ok, chances are it needs a new thermocouple. Very occassionally the boiler may need a new gas valve if a new thermocouple fails to cure the fault.
Ryan, December 2007