How to learn from proofs?
One important thing about proofs is that you will never be able to appreciate them, and therefore to learn from them, if you are not capable of reading the statement to be proved with a sceptical attitude, and to try to imagine it is untrue:
What's this nonsense they are claiming, it cannot be true!
Certainly it must be possible to satisfy the hypotheses without being obliged to accept the conclusion!
Once you have some mental idea of what a counterexample to the statement would look like, you can interpret the proof as an argument that systematically talks this idea out of your head, convincing you that it really is not possible to ever come up with such a counterexample.
Then you will have acquired a feeling of what the proof is really about, and you will be far more likely to retain it, and to come up with similar arguments when you need to prove something yourself.
But if you take a docile attitude and accept the statement to be proved from the onset, you will never be able to understand what all this reasoning was needed for in the first place.
The complicated proofs usually don't arise out of nothingness. People don't come up with proofs the same way they write them. They look at objects and observe their properties, until they see more and more, and then they try to somehow catch the essence of their observation, and the reasons for it: that is a theorem and its proof.
The steps in the proof often flow naturally from the observations that motivate the theorem itself. You should notice that complicated proofs often use many tools and lemmas which, while often not very general, are themselves of interest. I don't think that many mathematicians not dealing with geometry or group theory would easily come up with a proof of Sylow's theorem without knowing it beforehand (or even the exact formulation).
The general principles, ideas used in theorems tend to be relatively simple, and the proofs come from applying and combining them in the right way. What you can gain from a proof (beyond the theorem itself) is the intuition to tell you the ways you do these things.
If you want more insight, you should try to prove the theorem yourself, perhaps using the given proof as a source of hints, rather than the entire solution. When you see exactly what difficulties are there, you will appreciate the work done by the author of the proof and see why you should do some things and not the others. Or perhaps you will come with a completely different proof, in which case you will see two ways to look at the same problem, which also can be quite enlightening.
But you cannot expect to be able to come up with all kinds of hard proofs just like that. Tough proofs take time to develop. A radical example would be the classification theorem for finite simple groups (some history on Wikipedia).
I find it very helpful to revisit proofs after some time. I find there's two levels of understanding a proof:
--> line-by-line: you find the proof written in a particular textbook. for each sentence in the proof, you understand how it follows from the prior one.
--> conceptually: you can reproduce the proof because at each step it's clear to you what to do. (maybe there's a calculation or two that involves a random trick that you have to look up.)
Obviously the goal is to reach the second arrow.
Reading a proof over and over until you have reached the first arrow is sort of like doing an exercise, and, like all exercises, it helps acclimate your mind to the ideas at hand, and, in this way, it helps you get to the second arrow. But there's also an essential ingredient of time. Come back in three months, see how you feel.
You might think the second arrow entails the first, but actually it can still be hard to read an author's particular way of writing a proof, even when you understand the proof of a theorem. For instance, I think I could write down the proof of the Baire category theorem (don't quiz me), but if I were to go read a proof in a book, I'd probably get confused about the particulars of the notation without spending a little time, or, worse, convince myself that I was following. "You just do the obvious thing right? Yeah, ok, so wait, why is he saying $x_n \in B_n$, wait, what's $B_n$, oh, whatever, I know this."