The aes function is the workhorse the ensures that aesthetic mappings are only evaluated when the plot is rendered, not when it is created. (This lets you swap in and out data independently of which variables are mapped to what).
To see what the aes function is doing, just run it directly from the command line. You'll see it produces a list of unevaluated expressions
aes_string
If you are creating an aesthetic mapping within a function it may be easier to use the aes_string
function. Instead of using expressions, it instead uses strings, so that:
aes(x = mpg, y = wt) == aes_string(x = "mpg", y = "wt")