It depends on how you are doing it. If you have iCloud Drive w/ the iCloud option in System Preferences > Apple ID > iCloud > Options set for "Desktop & Documents Folder" that means any files on your desktop (wallpaper background area) or in your user's Documents folder are actually being synced to iCloud's Desktop & Documents folder. If you delete anything from those locations on your Mac that will sync the deletion of that specific copy of the file onto iCloud's Desktop or Documents folder and it will be deleted.
If you are taking a file from elsewhere, such as the root of your Home folder, or some place else (like Downloads or Pictures) and copy it up to your "iCloud Drive" proper (not iCloud's "Desktop" or iCloud's "Documents") then if you delete your local copy that won't affect your iCloud drive.
You should check your system preferences to see if you have that option turned on or not. And before testing this you can place a bona fide copy of that file to a USB flash drive or to someplace like your Home folder, or Pictures, or Movies, or Downloads, etc....just any place other than the desktop background area or to Documents to be safe, or use an expendable test file.