We can think, that's apparently given. How the idea is created in our head, or, even worse what is it, is not a part of mathematical study. We can say that an idea is a state of our mind, molecular, energetic, a dynamic state of biochemical processes, that keeps the idea present in our brains, purely on an energetic level.
We can conceive an idea or a thought, that can be called a postulate, and then use logical thinking to derive theorems from the postulate or axioms. You have to be sure that your next mathematical thought is originated in axioms and that it can be derived, proved by them.
Thinking freely, without axiomatic boundaries, is also an attractive scenario. Free train of thoughts can give initial and starting conditions, initial premises in, most likely, any axiomatic system.