@Roshni Patel - Thanks for reaching out to us.
Azure Application Insights allows one to monitor Web Applications, regardless of whether they're running on Azure or not. As mentioned in the Official documentation, this happens when one installs an instrumentation package in the application and sets up an Application Insights resource in the Microsoft Azure portal. The instrumentation monitors the app and sends telemetry data to the portal.
Every Application Insights resource has an Instrumentation Key, also known as the ikey, which specifies where the Telemetry is to be displayed. Also, you can instrument not only the web application, but also any background components, and the JavaScript in the web pages.
This document talks in detail about Dependency tracking with Azure Application Insights.
And this document explains how you can leverage Application Map to discover such dependencies.
Hope this helps. and please feel free to reach out if you have any further questions.
------------------------------------------------------------------
If the above response was helpful, please feel free to "Accept as Answer" and "Upvote" the same so it can be beneficial to the community.