There is no hardware encryption or decryption.
I encrypt some data and keep the key. I send the encrypted data to you (probably some cloud provider). I tell you to do some operations on the data. I don't tell you the key or what the data is or what the operations mean. You send the results back to me. I use the key to decrypt them.
You have helped me with my compute task, but the data you have is totally meaningless without the key, and only I have the key.
It's hard to believe that it's possible to make encryption where this can do useful work, but it is.