The cloud with an arrow icon means that the file is not currently on your computer. Clicking it downloads it to your computer.
There is a setting in System Preferences > iCloud > iCloud Drive > Documents called "Optimize Mac Storage." When this is selected, older files that aren't accessed regularly or recently are removed from your computer, but saved on iCloud.
The level to which the files are chosen for optimization is linked to how much free space you have on your Mac. If you have very little free space, many older files synced with iCloud drive will be offloaded from your computer, safely stored in iCloud. If you have a lot of free space, files might never be offloaded.
If you disable Optimize Mac Storage, you may run low on or run out of storage space on your Mac.
The exact length of time that the file is downloaded to your Mac is a mystery to me. Unfortunately, it's not possible to pick and choose which files you would like to offload, as this is done automatically.