I am a student of mathematics and have been increasingly feeling doubtful about whether or not I really understand the theory. What I mean by this is highly attributed to the style of textbooks in presenting information.
Authors simply write definitions and make vague connections, but I never get to know why or how theorems and their definitions are developed. How could I have discovered it for myself, roughly speaking?
I (and probably most people here) can empathize with you. I believe this is a symptom of how papers are meant to be written - most of the dirty groundwork that motivated everything gets swept under the rug, and can become really mysterious.
That said, some books and some survey papers actually attempt to give some motivation for the things they present. It's one of the reasons I love Herstein's "Topics in Algebra", for instance.
As for what you, as a student, can do, I would say it's often hard to "rediscover" everything. But, after reading some definition, try to create some of your own examples. Pause and ponder for a bit to see where everything fits to what you've been studying so far. If you struggle with this (as I often do when I'm just learning about something), try to study the history of the topic, to see where the concept inserts in the mathematical framework of its time - what were the people who discovered this thinking about?
Sometimes, authors purposely present a very opaque, supposedly neat definition, only to, a few pages later, give you some major equivalency, which clarifies everything. Why do this is unclear to me, but maybe, in some cases, you really weren't meant to understand the concept yet and just have to read on a little longer.
It's hard to give a general rule, but it often starts coming with time. If/when you do your own research, you'll start to see that sometimes even you can't pinpoint what motivated you to a particular idea, but other times, the connexions start forming very gradually.
I should also say that the answer is very subjective. As an algebraist, something which is intuitive for me can be completely unintuitive to a geometer and vice-versa - you really just have to try different things, use different resources, and see what works best for you!