Hello, Sunayana N.! I'll add to what the others have posted here.
The Dynatrace Agent is a shared library that needs to be injected into the application process. It gives us visibility into the transactions coming into and out of the process. Additionally, it'll capture information about the health of the host it lives on too!
The Dynatrace Collector collects and bundles data from the AppMon Agents. Collectors must be relatively close in the network to their Agents (same LAN), but can be far from the Dynatrace AppMon Server. Collectors post-process the data from Agents and send it to the Dynatrace Server for analysis.
If you have more questions, please feel free to reach out!
I also have a youtube tutorial where I explain what dynatrace is and how to get started. There I also explain server, collector and agents: https://www.youtube.com/watch?v=wExU-AQ0ydk&index=...
Additionally - make sure to check out our online Dynatrace University. there is a lot of educational material on all sorts of topics: https://university.dynatrace.com/home