Each O-Power has a time limit. When the time limit reaches, it's no longer viable.
When you battle Pokemon, your time limit still continues. If your time limit is up, you will continue to battle the opposing Pokemon until you defeat it, or run. That way, when your back on controlling your character, it will say, your O-Power's time is up - and now you can use another one, of do anything else.
Hope I helped! :)