There two big things.
- SharePoint On-Premise
When you install SharePoint on your hardware( servers) on your intranet(virtual hosted environment) using the your Active Directory. Data remains within you, you have full control on authentication, Server side customization, full control on environment from logs to central admin and full range of services applications access(depend upon the license). But to get this level of control you have to pay for extra, OS server license, SQL Server license and SharePoint License. If you are small company then this is big cost. You also need to worry about updating(CU / SP) your farm.
- SharePoint Online( Office 365).
Office 365 is a subscription-based online office and software plus services suite which offers access to various services and software built around the Microsoft Office platform.
which included hosted versions of Exchange, Lync, SharePoint, Office Web Apps etc.
SharePoint Online is one component of Office 365.I always called SharePoint online is subset of SharePoint on Premise. You will get only part of the services online version but cost effective way( as compare to on-premise). You don't need to worry about the patching the farm as MSFT regularly update it, No Need to worry about uptime / optimization as MSFT taking care of it. SSL offered by default. No server side customization, You have to relay on the Client Side.
The Microsoft SharePoint Online Developer Guide is designed to help you gain knowledge and understanding of SharePoint Online within Microsoft Office 365 as you build and extend your online sites to meet your business needs.
Now check below link to get complete comparison of features.