In general you can say that an AoO happens "at the same time" as the action which provoked it, but it does not disrupt it. In some trivial cases it is pretty obvious that you may not complete the action afterwards, such as if the AoO has killed you.
There are some actions which call for a Concentration check in case the AoO was successful (casting a spell, using a spell-like ability or a spell-completion item, using certain skills) to successfully complete the action, therefore they can be effectively disrupted if you fail to concentrate but it is not automatic. Also these kind of actions allow you to perform them on the defensive to avoid the AoO (but not the chance to fail the action itself) from the start.
In your example, you provoke an AoO to pick up the item, but the AoO doesn't prevent you to do that.