Ansel keeps a database of all images it knows, that is all images that were imported, until you actively remove them from the library (global menu : File → Remove from library). The library stores the filesystem path of the images, their metadata and their editing history.
Warning
Ansel does not listen to the content of filesystem folders, meaning it will not be notified if imported images are (re)moved on the filesystem. You will need to manually update the pathes if that is the case, or you can move those files directly with Ansel (under the global menu File).Ansel will then perform database extractions based on arbitrary user criteria : those are called collections. They are built in lighttable from the library toolbox and from the include toolbar. Ansel has no concept of gallery or virtual folder that you create first, then to which you add arbitrary images. Instead, in Ansel, you attach tags to images, then collect all images having a certain tag (or any kind of metadata, base folder, etc.), possibly mixing filters and search criteria to narrow-down the search : this is what makes a collection.
The first two tabs of the library toolbox, folders and collections, contain simple interfaces to the most-used querying criteria : base folder of the images (called filmroll), and tags attached to images. The third tab, queries, offers a more complete and somewhat cumbersome interface to perform any kind of advanced query, possibly mixing several criteria with boolean operators (OR/AND/AND NOT), among filmrolls, tags and many more image metadata.
Once you have built a collection by inputing querying criteria, you can save them into a preset into the library toolbox, by clicking on the menu in its header, then store a new preset.
Once the first stage of querying is performed in the library toolbox, the include toolbar, in the second row of the header, will apply workflow-related refinements (see lighttable for more details).
A collection can be defined only from the lighttable view, and is then globally shared within the whole software. It defines the content of the lighttable thumbnail grid and of the filmstrip in all other views.