Alpha mattes use transparency to reveal layers — the transparent parts of your matte layer show the layer beneath it.
Steps to use alpha mattes
Select the layer you want to reveal (like a video).

In the Timeline, look for the Track Matte column. Choose the matte source layer — something like text or a shape.

Your video is now revealed through the exact shape and transparency of the matte layer.

One more thing
You can invert the matte using the Invert button right next to the Alpha/Luma button if you need the opposite effect.
Related how-tos
How to use luma mattes in After Effects
How to track matte 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.