You are billed because of storage of virtual machine image & your personal data in Azure. To store all this Azure required to storage account. So even if you are shutting down or deallocate VM, you are continuously being charged for disk you are using. Azure even charges you for the Public IP Address which you are using to connect your VM. Any data/traffic goes outside your VM (egress), you will be charge for that too. Azure even charges for the Windows 10 License you are using in VM. If you have genuine windows 10 License then you can use it VM by Software Assurance Program, your VM bill will be half. If you reserve your VM instance for 2-3 year, you will get 40% around discount in VM price. VM price also depend on Region too. Older region has lesser price.
When you don't require your VM then first deallocate/delete VM, then disk drive associated with it & delete public IP created with it.
Microsoft charges for everything whatever you are doing in on premise. Storage, egress bandwidth, OS license, Public IP address, hosting, electricity bill, networking etc.
Cloud billing & its optimization is a big topic. Hope my answer will give you what you are looking for.