My friend installed something called Jamf on my MacBook
Jamf is a device management/mobile device management solution. It enables remote control and management of the configured device.

Due to the nature of the software, it can restrict users of the machine (even the admin users) from performing certain administrative operations (depending on the applied configuration). It is thus obvious that the end-users cannot uninstall and/or quit the Jamf app.

Jamf is one of the well-known among many remote/mobile device management solutions, generally used in enterprise/school environment to centrally manage a large number of mobile devices (laptops/tablets/phones). Jamf is absolutely not a virus, nor is it a ransomware.

You can learn more about Jamf product offerings here:


https://www.jamf.com/products/


There is absolutely no reason to throw away your MacBook. I'd advise you to get in touch with your friend and ask him for the reason why it was installed in first place. You can also ask to remove it, if it was installed in accident, or just out of curiosity.

A mobile device management solution is generally not required for personal devices.