Hello Jayaprakash Pulugovinda
Welcome to Microsoft Q&A Platform, thanks for posting your query here.
As Andreas mentioned in the previous response, you need to have Public IP with SQL port on NSG open to access from local machine.
For your ask on How to connect to SQL Server on an Azure VM from your local machine?
-Make sure the Azure VM on which you installed SQL has a public IP associated to it. You can check this in the Azure portal by navigating to your VM's "Networking" settings.

-On the NSG make sure the port that SQL Server is using (by default, port 1433) is open in "Inbound port rules" of NSG, if not adding a new rule for port 1433 will allow access on the port.
-On your local machine, open SQL Server Management Studio and click "Connect". In the "Connect to Server" window, select "Database Engine" as the Server type, and enter the public IP address of your Azure VM in the "Server name" field, followed by a comma and the port number (e.g. "27..45.98.09,1433").
Please Note, incase of your Azure VM is configured to use Windows Authentication, select "Windows Authentication" as the Authentication method and click "Connect". If your Azure VM is configured to use SQL Server Authentication, select "SQL Server Authentication" as the Authentication method, enter your SQL Server credentials, and click "Connect".
For your ask on vice versa: How to connect to a local SQL Server instance from an Azure VM?
-Make sure that the local SQL Server instance you have configured allows remote connections. In SQL Server Management Studio by navigating to the "SQL Server Network Configuration" section of the server properties, and enabling the "TCP/IP" protocol.
-Open the port that SQL Server is using (by default, port 1433) in your local machine's firewall.
-Now that the local machine configuration is done, in Azure VM, open SQL Server Management Studio and click "Connect". In the "Connect to Server" window, select "Database Engine" as the Server type, and enter the public IP address of your local machine in the "Server name" field, followed by a comma and the port number (e.g. "22.45.77.99,1433").
Please select the Authentication methods appropriately as mentioned in the previous Note.
Hope this helps.
If the suggested response helped you resolve your issue, please 'Accept as answer', so that it can help others in the community looking for help on similar topics.