First of all, it sounds like you’re describing the action of the Time IPO.
Otherwise, look at Actions and the NLA Editor. These are all higher-level constructs, built on top of the IPO mechanism, and they provide for such things as “fade-in” and “fade-out.”
I was working with Blender for quite a while, futzing around with IPOs by hand, until a little voice whispered, “Gee, I wonder what these other windows do?” %| It turns out that IPOs are a very primitive, “foundation” mechanism upon which several layers of more sophisticated functionality are built.
You might also do the expanding-cube thing using “Relative Vertex Keys,” where you describe the “normal size” pose and the “expanded size” pose and are able to morph the cube from one to the other. This is more flexible than simply “scaling” the cube.
As you begin to work with Actions and NLAs, there is one particular gotcha, and that is that an “Action” is initially linked to an object and must be converted to an NLA strip; otherwise, it will remain attached to the object and will continue to influence it, interfering with or superseding the intended actions of the NLA strip.
Fair warning: You will definitely reach a " :o point" with all this stuff, fairly quickly and frequently. It’ll make you :-? then :x then :< and then in very quick succession! And then, just as you start to feel 8) , it’ll do it all over again. %| Don’t feel lonely when that happens.