After Effects is calculating the math of all your layers, effects, masks, keyframes, etc. RAM previews are part of something Adobe calls the Global RAM Cache, which is (mostly) automatically managed. When you first play your timeline in After Effects, you will usually see a green line begin to grow over your layers.
Why is this? The growing green line (i.e. But usually, on the second play through, it plays smoothly. Common to most motion graphic applications, After Effects will not skip frames - it will play every frame of video, even if it has to slow down playback to do so. If you have a 10-second composition in After Effects and hit Play, it may take 10 seconds, or it might take 17 seconds, or it might take 2 minutes and 43 seconds. This is not always the case in After Effects. In Premiere, if you have a 60-second sequence and hit Play, the playhead will reach the end of the sequence in exactly 60 seconds, even if Premiere has to skip frames to do so.
To get started, one thing to understand is how playback differs between Premiere and After Effects. But much like the Media Cache in Premiere, understanding a little behind the scenes action in AE can fix glitches, conserve system resources, and free up valuable hard drive space. Underneath the hood is a whole other story. After Effects is a challenging enough application to learn from a forward-facing perspective.