Check the reference manual:
Returns a unique integer value for each distinct evaluated value of expression encountered during the script
execution. This function can be used e.g. for creating a compact memory representation of a complex key.
In order to create multiple counter instances if the autonumber function is used on different keys within the
script, an optional parameter AutoID can be used for naming each counter.
Also search for autonumber in the forum, there are a lot of questions about autonumber.
Often you need to create composite keys between tables, i.e. keys that are concatenations of several other keys. These composite keys are often 50-100 characters long (or more) and take up a fair amount of memory. But they are usually not displayed.
So, if you want to save some memory space, you should use the Autonumber() function on the composite keys. It replaces long strings with a short number while maintaining all information.