How do CSS animations work?

CSS animations are defined with @keyframes and applied with properties like animation-name, animation-duration, and animation-timing-function.