Before I describe the "how" let me describe the "why" first. Today, compliance admin can set a "default" label for users. Within Microsoft, we have a default label called "General" that is published to all employees. While this approach serves the purpose of labeling documents in a generic way but does not help in distinguishing a highly sensitive document from a low sensitive document "unless" the user labels the document manually. Automatic labeling works on a pattern and in several cases, you may not have any pattern. Like you created a site to launch a product and ALL the documents stored on the site are sensitive in nature. You don't want to rely on manual labeling by users as our data indicates people tend to just forget to label files. In such cases, this new feature will be of help. Once the library is configured with a default label SharePoint will guarantee that any "new" office files saved or uploaded to this library that do not have a label or even a label with low priority (applied before via automation or default) will be labeled with the configured library label. In other words, think of this feature as automatic labeling by location, where location is here is a library.
Note that if the uploaded document is manually labeled then it will not be touched. Moreover, if there are existing documents in the library then those will also not be touched unless a user edits the file. The stamping of the label is done in an asynchronous thread after the document is uploaded which means that there will be a delay of a few minutes before you see the label being applied automatically. If you are creating the document via the Office app on your Windows, Mac, or Mobile devices and directly do a "save-as" to SharePoint then the act of automatically applying the library label will wait till you close the app. For details read our official documentation.
Licensing: This is a premium feature. The exact licensing details will be announced during GA (like OCT 2022). You can try this feature if you have Office 365 E5(or similar) license. You can use a trial license to try this as well.