Azure is a collection of cloud services provided by Microsoft.
One of the services allows you to host your own Virtual Machines in Azure. You still need to buy the licenses of all the software you install on these machines. It's basically the same situation as when you install SharePoint on a server within your organisation. Microsoft calls this 'on-premise' installation.
An other service in Azure is 'SharePoint Online'. It's part of the online (web-based) office solution. In short: Microsoft hosts SharePoint for you. You typically pay a fee per user. Various subscriptions types are available. The most important thing to realize is that with the online version you do not have access to the server, you are limited due to security (and stability) reasons and not all the SharePoint features are available in the online version.
Whenever you start developing for SharePoint always make sure if you want to develop for an 'on-premise' or for an 'online' SharePoint version.
Since I do not always have access to an internet connection, I prefer to develop SharePoint solutions on my laptop.
You need at least 16GB memory and an SSD drive to speed things up. Create a SharePoint solution, build and test it on your development machine and deploy it to your server.
As stated before, when creating a solution for the SharePoint online version you have (security) restrictions (search for 'SharePoint sandbox solution').