Rectangle masks are great for wipes, reveals, or simple cutouts that need clean, straight edges.
Steps to create a rectangle mask
Select your layer and choose the Rectangle Tool (Q) from the toolbar.

Click and drag across the layer in your comp viewer and a rectangular mask path appears in the timeline instantly.

Press MM to tweak Feather, Expansion, or Mode for cleaner results and smoother edges.

One more thing
Hold Shift while dragging to create a perfect square mask.
Related how-tos
How to create a circle mask in After Effects
How to animate a mask path in After Effects
How to combine masks with add and subtract in After Effects
Need more help? Explore all our How-tos in one place.