USB Power - The basics
USB devices can draw up to 100 mA to perform initial negotiation, called enumeration, with the host.  During this process they can request up to 500 mA.  The host then decides whether to grant the extra power or shut down the device.

In some cases the host may tell a device to go into low power sleep mode.

Most wall-powered computers just connect the USB power to their 5 V supply via a polyfuse and don't attempt to control or even monitor current.  Battery operated device often do carefully manage USB power.  You may therefore get away with just drawing power without asking when connected to a desktop computer, but possibly not when connected to a laptop.

Of course, this is all in the USB spec.