Pay to public key is a very familiar process when you have to pay an amount of money to the address or to script hash.
The only difference between them is the data presented because the public key is presented as an elliptic curve and therefore it is unnecessary to hash and duplicate.
The type of address is commonly used in older exploit software to generate coinbase electronic transactions – software that has not yet been updated, including P2PKH.
ScriptPubKey = <Public key> OP_CHECKSIG
ScriptSig = <Signature>
The type of script hash is a very simple use of the OP_CHECKSIG operator to confirm the signature generated by the private key when requested. Therefore this type has the ability to unlock certain transactions.