What is DRM? and how it works?

Digital Rights Management (DRM) is a commonly used term. Can you explain what it is and how it works?

I understand the basic definition, but I’m looking to learn more about the technical details behind it and how it works.