When you cast
Anyspell, it allows you to prepare an arcane spell from a spellbook you have available (you cannot simply pick the spell at your leisure).
Casting
Anyspell and thus making the slot ready to cast the arcane spell from it takes time, so it's nothing you can do spontaneously, like during a combat.
Thus, it's not exactly as you said, but closer to the first.
If you are familiar with the concept, it's pretty much the same as if a wizard left a slot open during initial preparation in the morning, and later during the day, sits down for 15 minutes and prepares a spell from the spellbook or other arcane writing in that slot (only differences are, that you prepare
Anyspell instead of leaving the slot open; and cast it instead of preparing the spell into that slot, which - the preparation of the arcane spell - is the spell effect of
Anyspell, so this part is almost the same; and, of course, that the spell is limited to 2nd level).
Bye
Thanee