I want to ask if Clam AV works on any hosting panels?
Clam AV is enterprise antivirus product
https://www.clamav.net/documents/installing-clamav#requirements
It comes as Plugin in CPanel
https://documentation.cpanel.net/display/ALD/Configure+ClamAV+Scanner
Not sure about other hosting panel, but when it comes to ease of installation, CPanel / WHM has just few steps to get it working. I saw clamav shipped with vestacp in free control panels.
it will protect the hosting server from malware or just scan malware/virus?
It does both, first thing you need to do, is to scan your /home directory of each account on your VPS (assuming you are using VPS and prefer GUI tools). Once everything is fine, you can see that whenever you upload a file via CPanel file manager and if it is infected file, the upload will not succeed. In this way it will protect actively, after it is installed.
I will not say that it is very powerful out of box, but it will atleast mitigate most of the files that may be infected. You have to regularly scan your accounts to see if virus files are uploaded in other modes.
Suppose wordpress, does have media uploader, if the file is uploaded using that interface, then sometimes it is possible for clamav unable to detect infected file. So its still possible to get infected files uploaded this way.
There is a soultion for this issue, you can install plugins like wordfence which have some options to throtlle or control uploads and it has active scanner as well.
Its important that you keep your host (PC or Computer or Laptop) virus free and secure, as most of the times, the virus starts spreading through uploads and email clients (desktop email clients like outlook etc..) especially when using windows.
It is why I afraid of using shared hosting, easily get local hack or infected virus from other hosting accounts on same server.
Not all shared hosting servers are the same, but it may or may not happen with every provider. There are providers out there, who does active monitoring of server and make sure that clients accounts are safe.
And you may not be safe if you use VPS, and it is not hardened and secured. Even though it is VPS, unless you secure all your accounts on your VPS. It may be the same case like shared environment without security and protection. In any case it may or may not happen.
Only thing, you can do is to manage your websites properly and harden them, it may be time consuming, but its worth the efforts put into making things better. Hope it clarifies your queries.