Keyframes are the foundation of animation in After Effects — they mark when and how properties change over time for any layer.
Steps to add keyframes
Select a layer and press P, S, R, or T to reveal Position, Scale, Rotation, or Opacity.

Click the stopwatch next to whichever property you want to animate to set your first keyframe.

Move the playhead forward, change the property value, and After Effects automatically adds another keyframe. The animation happens between those two points.

One more thing
Press U to reveal all keyframes on your selected layer. Press UU (double U) to see all modified properties at once — super useful for complex animations.
Related how-tos
How to use the wiggle expression in After Effects
How to copy and paste keyframes in After Effects
How to reverse animations in After Effects
Need more help? Explore all our How-tos in one place.