Einfallen in this context is closely related to erinnern. While sich an etwas erinnern is a conscious process where the subject is the person remembering and thus the verb is best translated by to remember something, in the case of einfallen it is more an appearing idea — and the idea is also the subject.
Mir fällt die Telefonnummer nicht ein.
is equivalent to, but syntactically distinctly different from:
Ich erinnere mich nicht an die Telefonnummer.
Both would best be translated into the same English sentence:
I can’t/don’t remember the telephone number.
The difference is a slight nuance. When saying »Sie fällt mir nicht ein«, you are just waiting for the helpful spark of a thought and then it should be there. When saying »ich erinnere mich nicht an sie«, you’re trying to remember but can’t make it happen.
And note how the einfallen or (hin)einfallen figuratively alludes to an idea dropping into your head — much like the other meanings of einfallen (to invade, to collapse, etc.).
Here are some examples on the other meanings of that verb, which could be the reason for it being confusing. First, in the sense of invading:
Heute Nacht wird unsere Armee in das Nachbarland einfallen.
Tonight our army will invade the neighboring country.
Letztes Jahr fielen die wilden Horden in unser Land ein.
Last year the wild masses invaded our country.
Documented on dict.cc.
And, second, an example in the sense of collapsing:
Gestern Nacht ist die alte Scheune eingefallen.
Yesterday night the old barn collapsed.