The "perfect" tenses (Past perfect, present perfect, and future perfect) are used to talk about something that is complete, finished or already done:
Past perfect: I had woken up. (or "The alarm rang, but I had already woken up")
Present perfect: I have woken up. (or "The alarm is ringing, but I have already woken up")
Future perfect: I will have woken up. (or "The alarm will ring at 8am, but I will have already woken up")
I don't know the rule to "quickly recognise" when to use them. You will pick it up naturally as you practice speaking, reading, writing and listening to English.