No matter how you have to "refill" a fuel cell, it will take energy to do so. There are several different types of fuel cell, but the hydrogen used in hydrogen fuel cells is not quite the same thing as thehydrogen that's floating around in the air we breathe. To make it usable for a fuel cell, it has to be processed, and that processing takes energy.
As we all know, you can never get more energy out of a system than you put in. Following that backwards, if we get energy out of a fuel cell, we must put energy in. In that way, they are very much like a rechargeable battery.
Most current plans use our current energy infrastructure to provide the base energy input into the fuel cell "system". That infrastructure relies mainly on oil and coal burning power plants. This, in the case of, cor example, cars, all we're doing is removing emissions from the tailpipe to the smokestack. The energy has to come from somewhere, after all. The way to make it a truly sustainable, renewable system is to use renewable resources such as solar or wind power.
Yes, this is a simplified explanation, but i don't really have the space or inclination to copy and paste all of the relevant details. I don't know how familiar you are with the technology but, as always, howstuffworks.com is a great place to start.