Shape layers are vector-based graphics you can animate endlessly without losing quality — they scale perfectly at any size.
Steps to create shape layers
Make sure no layer is selected first. Choose a shape tool from the toolbar — Rectangle, Ellipse, Polygon, whatever you need.

Click and drag in your comp viewer and After Effects creates a Shape Layer.

Twirl it open in the timeline to edit Fill, Stroke, and Transform properties however you want.

One more thing
You don’t always have to draw shapes manually. Double-click a shape tool (like the Rectangle Tool or Ellipse Tool) with no layer selected, and After Effects instantly creates a perfectly centered layer that fills your comp.
Related how-tos
How to create a rectangle mask in After Effects
How to fill shapes with color in After Effects
How to use merge paths in After Effects
Need more help? Explore all our How-tos in one place.