When you have transitive verbs (verbs which can have direct objects) in the simple past tense and perfective tenses, the subject takes a ने. The verb then conjugates with its object.
When the subject is यह/वह the addition of this ने makes them इसने/उसने respectively.
The present perfect tense is basically the sentence in the simple past tense with a है added to the end. Similarly, the past perfect is the sentence in the simple past tense with a था at the end.
Simple past - उसने शराब पी - He drank alcohol
Present perfect- उसने शराब पी है - He has drunk alcohol
Past perfect- उसने शराब पी थी - He had drunk alcohol
(Note that we've used the feminine form पी because शराब is feminine)
In some tenses, transitive verbs (verbs which can have direct objects) take the gender and number of their object(s) rather than the subject. Here, the verb पीना is conjugating with its object शराब which is feminine. So, the feminine past tense form पी has been used. पिया is the masculine past tense form that can be seen in क्या उसने दूध पिया है? (Has he drunk milk?) where दूध is masculine.