I am running a Raspberry Pi as a USB-server for my virtual environment (see this article). That device is plugged into my server's UPS so it will keep running when there is a power failure. But when you use your Raspberry Pi for other purposes, for example in a stand-alone scenario with sensors or switches you also might want it to keep running when there is a power failure.
USB Power Banks that are promoted to charge mobile phones are very useful for that purpose. But you should always test the one you want to use. Because some of them reset the power-output when switching from charging to decharging. And then you still loose power to your device.
In the video you can see that I have tested a LogiLink PA0064 Mobile Power Bank 2200mAh. I first demonstrate that you can unplug the Power Bank from the 220v/110v connection and the RaspBerry still runs. Then I unplug the Power Bank to demonstrate that the Raspberry Pi was indeed running of this Power Bank and later I boot the Raspberry Pi from the Power Bank. And at the end of the video I demonstrate that the power can be restored to the Power Bank without interruption of the USB-output.