usually I see that lock script: "OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG" and the type of the transaction is "pubkeyhash"
It is not a "key" in that script it is a hash or more specifically a 160-bit hash. It is also called pay to pubkey hash or P2PKH for short.
Now I have this lock script: "OP_HASH160 OP_EQUAL" and the transaction type is "scripthash".
Same as above it is a hash not a key and it is called pay to script hash or P2SH for short.
How is it possible to spend this UTXO?
P2SH scripts are a special case that were added many years ago through a soft fork that is explained in BIP-16[1]. The way these scripts are evaluated is a two step process.
First step is what is normally done in any other script (run signature script then run pubkey script) but a copy of the top stack element before running the pubkey (or locking) script is stored for next step.
Second step is evaluating that item we duplicated before (the top stack element) as a script called Redeem Script. Then run that script too using the existing items in the stack the rest is the same (eg. push some data to the stack, pop data, run CheckSig ops, etc.).
Keep in mind that the Redeem Script can be anything from a simple OP_TRUE to complex nested conditionals with locktimes and the common multi-sig scripts with multiple public keys inside.
[1]
https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki