The aggregate command reads from a collection and it can optionally write to a different (or same) collection via special output stages $out and $merge. This is different than update command (known as updateOne or updateMany driver methods) which can use some aggregation stages to specify how to transform the document being updated.
Hope this helps,
Asya