When SharePoint is deployed on premises in an organization, it is called One Premises SharePoint deployment. The deployment requires configuring servers and databases.
Then there is SharePoint Online, which is a cloud based solution. It does not require any physical servers or deployment of databases. Everything is managed by Microsoft as part of the Office 365 subscription.
Both of these solutions are good on its own way. On Premises in a sense gives more flexibility since you can create a public facing website and it can be connected to other applications like Sales Force and SAP.
SharePoint Online does not allow you to have a public facing website. One can only create team sites. And it 9s not possible to connect to applications like Sales Force and SAP. But one of the advantages of SharePoint Online is it is easier to relieve the latest updates and features. This is possible since it is hosted on the cloud.