An Alpha channel defines the transparency in a video clip or image. Transparency is assigned to the pixel. In After Effects, if you create a composition that you intend for something to be seen underneath, or seen through the “empty” area when you are using it in postproduction, you need to export your clip with alpha.
When you add your composition to the render queue, click on the output module settings. In the video output section, you’ll see a drop-down by the word Channels. This is where you select RGB, Alpha, or RGB+Alpha. RGB+Alpha should be selected, and this will export your video with the alpha channel.
However, not all video formats/codecs support alpha. In After Effects, the Animation codec does, as well as Apple ProRes 4444, Apple ProRes 4444 XQ, and a few others. You must select one of these codecs to have the RGB+Alpha option become available.
If you export your composition using Adobe Media Encoder, once you select a proper format that supports alpha (such as QuickTime), you will see a list under the presets drop-down. Media Encoder lets you know which options include alpha.
Watch this short video for a visual demonstration of exporting with alpha channel: