What it means
A brain-fart is that sudden, embarrassing blank when your mind just stops working for a second, you forget your own phone number, walk into a room and forget why, or call your friend by the dog's name. It's a harmless little misfire of the brain, gone as quickly as it came, and usually good for a laugh once you realise what you've done.
Usage examples
"Total brain-fart, I stood at the cash machine and completely forgot my PIN."
"Sorry, brain-fart, I called you Dave for a second there, no idea why."
"I had a complete brain-fart and put the milk in the cupboard instead of the fridge."
"Wait, don’t tell me, I’m having a brain-fart and her name’s just vanished out of my head."
Where it comes from
This one’s been floating around informal American English since at least the 1990s. It welds brain to fart for a jokey image of a quick, involuntary mental blip. The whole charm is in how crude and harmless it sounds, which is why people use it to laugh off a tiny lapse instead of making it feel serious.