Go to the Adobe website and click on downloads. Set up an Adobe ID and download. If your machine is not compatible with the latest versions there are some links on the download pages to previous versions.
Here's information about the trial version, including a link:
Start here to learn After Effects: http://adobe.ly/bjBT3P