Data encryption is a method of converting sensitive information into a code to prevent unauthorized access. It involves algorithms that encode the data, making it unreadable to anyone who does not have the decryption key. This technique is crucial in healthcare for safeguarding patient information.