Medically, Josh61's answer is spot on. But anomic aphasia is generally reserved for individuals who have suffered some sort of brain damage or head trauma.
Nevertheless, this sort of forgetfulness happens to otherwise normal people every day. In these cases, we wouldn't use anomic aphasia, but instead we call it the tip-of-the-tongue phenomenon.
The tip-of-the-tongue phenomenon describes the case where an individual is unable to remember the specific word or phrase, but is otherwise able to recall specific details (sometimes including the first letter or syllable) and other associated memories about the thing described by the word or phrase.
Often, the individual will eventually recall the word or phrase. Sometimes, this may happen hours or even days later.
We have a few idiomatic phrases to describe when we experience the tip-of-the-tongue phenomenon:
tip of the tongue
The name sake of tip-of-the-tongue phenomenon. In day-to-day speech, we might say things like: "It's on the tip of my tongue!"
"Tip of the tongue" attempts to describe the feeling that the word or phrase is just sitting on the tip of the speaker's tongue, and the speaker is unable to get it out of their mouth.
brain fart
This is probably the second most common phrase I have ever heard to describe this. The idea is that your brain suddenly stops working.
It comes not from the "flatulence" meaning of fart, but more from the association with sudden and complete disruption that a loud, obnoxious fart can bring. If you've ever been in a room that's gone suddenly quiet after someone lets a loud one rip, you'll know what I'm talking about.
In this sense, brain fart like your brain just farted, and then came to a complete standstill. In speech, you might say: "Ohh...uhh...what is the word...? Dang, brain fart!"
draw a blank
Drawing a blank invokes the images of drawing a blank or useless item from a pile (or deck, or stack, etc.) It's believed to come from an old lottery practice, where tickets (bearing the names of the people who purchased them) were mixed in with one or more blank tickets. If the blank ticket came up, then no one won a prize.
In our case, it's meant to invoke an image as if the individual went to pull the memory, and came up with a blank memory. In speech we might say: "I should remember her name; I'm drawing a blank."