Before connecting to an Atlas cluster, ensure your application can reach your MongoDB Atlas environment by allowing your applications to make outbound connections to ports 27015 to 27017 to TCP and UDP traffic on Atlas hosts.
To connect to an Atlas cluster:
Configure an IP access list entry on the Atlas project’s IP access list for Network Access
Create a Database User with access to your database(s) for Database Access
Copy your cluster's connection string by hitting CONNECT on your cluster and following the instructions for your chosen connection method
Paste the connection string into your application (to connect via a driver), the command line (to connect via the command line tools) or the Compass UI (to connect via Compass).
For instructions on connecting to your Atlas Cluster see:
Connect via Driver to connect with an application using a MongoDB driver
Connect via mongo Shell to connect and use the MongoDB CRUD Operations
For troubleshooting connection issues:
Data Explorer for managing Atlas data
Test Failover to test the failure of a primary replica set member on an Atlas cluster
See also the article Connections in MongoDB Atlas Clusters explaining Atlas connections and where to see them.