The answer is yes and no. It depends on the version of Malwarebytes you are using.
The free version of Malwarebytes does not stop viruses from infecting your machine. It only run when you do a scan of your machine looking for viruses. It does a good job when it does the scan in finding and removing viruses. However, it does not normally run in the background and catch viruses when they first hit your machine. It requires you regularly running a scan to find viruses. Other anti-virus software sits in the background and watches for viruses landing on your machine.
The premium or paid version of Malwarebytes does run in the background constantly watching for viruses and blocking them (realize that the newest and latest viruses can slip by all the anti-virus software, although most look for characteristics besides specific viruses). You can also still manually run scans (which is suggested occasionally in case something slips by).
If you have the free version of Malwarebytes it is your responsibility to run scan to checks. For this reason, the free version will not work for most PC users as a good anti-virus software.