You find correct answer directly on Android Developers website here is link to promo code page.
https://developer.android.com/google/play/billing/promo#redeem
In simple terms if
PROMO CODE for paid app
you can reedem it following thease steps
PROMO CODE for App subscription
If promo code is unique then you redeem it by just following above steps
But if PROMO CODE is friendly or custom like "DIWALI" "FREE30" then you need to install the app for which you received PROMO CODE
After installing app, go to subscribe app option
Open subscription payment options and scroll down to select REEDEM option
Now you need to complete payment while PROMOCODE applied
You won\'t be charged but need to have a valid payment option
If you don\'t want to pay for subscription then make sure to cancel it before end of trial period