Hey @Atharva-Bet another great question.
The PEM and PKCS#7 formats are BASE64 ASCII encoded files, meaning that you can open them in a text editor (human readable) and usually the certificate is in between:
and these certificates use the .pem, .cer, .crt file extensions. These files do not contain and private key. If a PEM encoded file contains the private key the format will be .key
The PKCS#7 encoded certificate will have .p7b and .p7c format.
The DER and PKCS#12 encoding produce a binary file (not human readable) used in:
DER = Java-based Web servers (formats are. der and .cer)
PKCS#12 = are used mainly in Windows servers, remember this encoding type and format does contain the both the public and private key
Knowledge is a road to be traveled upon, not a destination to be reached~~