It sounds like what happens to me with working memory problems (sometimes exacerbated by attention problems), because I have ADHD.
You ever walk into a room only to realize you can't remember why you went there? That's an example of a working memory fail. If you have poor working memory, the same kind of problem happens all the time, for all sorts of things, not just for walking to rooms. For example, forgetting what program I wanted to open (and why) in the time it takes me to move my mouse cursor to the START menu.

When I'm reading a book that has small text, little line spacing, and/or long paragraphs, I'll easily lose my place, then I'll forget what I just read in the time it takes me to find the next line.

I often have trouble with verbal communication, so it's easy for someone to think I'm not-too-bright if they meet me in the wrong circumstance. (
Here's an article someone wrote about the speech problem in case you can commiserate.)
On particularly bad days, whenever I have such a working memory fail, I'll wonder, "Wait, what was I [doing/looking for]?" but I'll sort of get mentally "stuck" at that point and zone out for a few seconds. I'm pretty sure I have a stupid-looking facial expression during this.
Besides ADHD, you can get similar symptoms from poor sleep, autism, brain injury, med side effects (psych meds, anesthesia from surgery, probably others), age-related cognitive issues, etc. I think hormone or nutrition issues could cause it too.