There are two ways of animating things in CSS, transitions and animations.
Transitions are the simpler built-in set of functionalities that can do things like fade elements out or resize them.
Animations are for transitions across multiple CSS properties or when the timing between the states of a single transition need to be controlled precisely.