As others have said it's most likely the IAC valve sticking, and in most cases it can be cleaned out with carb cleaner.
My Thunderbird had the same problem. It had an uncanny habit of revving to 3000 rpm the moment somebody walked in front of it if I was sitting somewhere idling. That got me quite a few dirty looks, and earned it the nickname "Christine".