As you would expect, the word brainstorm involves thought. A brainstorm can be an "Aha!" moment, while brainstorming is the process of trying to think of ideas.
If you've ever needed to find a topic for a paper and have just started listing every idea coming to you, you know what it's like to brainstorm. People brainstorm when they need a new idea. You can also say you had a brainstorm when a good idea or solution occurs to you. Often, this kind of brainstorm happens when you're not even working on the problem. For example, a scientist might have a brainstorm for a new project in the shower.