Your iCloud drive and your Mac interact with the files in your Mac's iCloud Drive folder. These are synchronised to keep them up to date in both places - and indeed on any of your devices signed into your iCloud account.
It is possible on your Mac to choose to optimise your file storage so that files left unused for a period of time are removed from your Mac and these are available at any time to download again from iCloud. Go to System Preferences > Apple ID > iCloud. On the right side of the panel you will see a box labelled Optimise Mac Storage, and inviting a tick. This will activate the option which as you will see is described: The full contents of iCloud Drive will be stored on this Mac if you have enough space. Older documents will be stored only in iCloud when space is needed.
If you do not activate this option this will not occur. With this exception then, all your documents will be stored locally in your iCloud Drive folder on your Mac, (as well as iCloud).
Be aware also that in the iCloud Drive option in System Preferences > Apple ID > iCloud it is also possible to choose to synchronise your desktop and documents folder with iCloud.
For further information read Apple's support document Access and manage your files in iCloud Drive