Encapsulation in object-oriented programming involves wrapping data and functions that work on that data within a single unit called a class. This bundling of data and functions protects the data from outside modification and exposes a controlled interface. Encapsulation provides data hiding by restricting direct access to data members and requiring use of accessor functions, allowing control over modification and maintaining integrity. It improves maintainability, readability and security of code by combining related data and functions.