The first is the present perfect. The second is the past perfect. This is used to tell you that an action was completed before another (also past) action.
I had finished my homework so I was able to watch the football game without any guilt.
Hi Dear ! The difference is only the tense. Otherwise, the sentence is very simple. The main tenses are present ant past formate. Nothin else. All the best.