Which protocol? That makes a difference. If it's a LUN, you will always be looking at the file system the initiator puts on the LUN. When you look at ONTAP, you look at the WAFL file system in the FlexVol layer, or in the Aggregate. Those are 3 different things and each one will show a completely different amount of free and total space. There is typically a discrepancy between an initiator file system (NTFS, EXT4, VMFS, etc.) and a FlexVol or even the LUN size.
The reason why a LUN shows different is because it is a blob, and data may have been overwritten but not sent to be zeroed from the initiator (SCSI_UNMAP or TRIM). Rather than freeing the blocks, the LUN file in ONTAP just overwrites old blocks with new blocks as they are written if not in use anymore. The only way to get it to mostly match up is some kind of Space Reclamation or doing a zeroing operation. This is not normally recommended due to performance overhead, and must be scheduled.
I hope this helps.
If it's a NAS volume, there are a few things as mentioned in the prior post.