How do you decrypt a data file to that has been encrypted with the users public key?

When you reference a "public key" you are implying that the file has been encrypted using "asymmetric cryptography". In asymmetric cryptography, encryption and decryption depend on a key PAIR. The user retains their private key and publishes their public key. Anyone can encrypt a file using the user's public key and send it to them. The only person who should be able to decrypt a file encrypted with that public key is the holder of the private key - which, unless the user has made the mistake of sharing their private key - means that only the original user can decrypt the messages sent to them. Most of the asymmetric encryption algorithms use pretty much the same method to decrypt that was used to encrypt, but use the "other" key from the key pair. Messages encrypted using the private key can only be decrypted using the public key - which provides some authentication that the message indeed came from the holder of the private key. Messages encrypted using the public key can only be decrypted by the holder of the private key, so messages sent to them should be secure.