TL;DR
All but the Chinese use the Deep Space Network, so the DSN is in charge of coordination. Spacecraft also need a surprisingly low amount of communication time with the ground, and they have a unique ID to check that the messages they receive are indeed destined to them. Spacecraft operators know the exact frequency of their spacecraft radios, and communicate that to operators.
Ground stations
ExoMars, EMM / Amal / Hope, and Mars 2020 Perseverance all use NASA's Deep Space Network (DSN) for at least part of the mission.
The current mission set (link to the public April 2019 Excel file) ExoMars, EMM and Mars 2020 have the launch date, the future critical event and expected end of mission dates (respectively rows 44, 11 and 29 in the April 2019 list).
The DSN is composed of three communication sites: Goldstone, Canberra and Madrid. This allows deep space missions to be in sight of two sites at all times. ESA does have Estrack, but they will still use the DSN for critical events (src):
The NASA Ground Stations & Communication Subnet (DSN), to be considered for “critical phases“ like Safe Mode(s) or Flight Software upload or for “extreme contingencies” like the loss of SCC attitude
Communication requirements
Telecommunication can be tricky for spacecraft, especially scientific missions. Scientists want to collect as much data as possible to perform lots of calculations on the ground. Engineers determine the data bandwidth available to the spacecraft based on the chip rate, the data modulation, the carrier frequency, and the bandwidth reserved for telemetry (metrics used for the state of health of the spacecraft). Moreover, spacecraft navigators must perform tracking measurements with the spacecraft: these require antenna time, but do not necessarily transfer data between the ground and spacecraft.
Summarizing: deep space spacecraft will need antenna time for tracking every few days for 4 to 8 hours (assuming a tracking measurement every 60 seconds, which is the common sample rate for DSN tracking). Then, after tracking, the antenna is reserved for another 30 minutes to 2h (depending on the mission) for data transfer only. Hence, a deep space spacecraft only communicates less than a dozen hours every few days.
Source: me, as a spacecraft navigation engineer on an upcoming Moon mission.
Coordination
Since all missions adhere to the same communication frequency bands. These are specified by the International Telecommunications Union (ITU), and all deep space missions launching from a country which is part of the ITU must obey these rules (summarized on Wikipedia).
Since communication is quite limited (as we saw above), it's the job of the DSN to tell spacecraft operators when they will be communicating with their spacecraft. This is usually frozen two weeks ahead of the tracking and communication pass.
Moreover, there is an international agreement on the data formats for space communication: Consultative Committee for Space Data Systems (CCSDS). One of the (very many) agreements, is that the spacecraft packets must start with a Spacecraft ID, which uniquely identifies a spacecraft. The list of these IDs is searchable here. Typically, spacecraft radios include the spacecraft ID in the decoding and encoding circuits in a way which cannot be overwritten or corrupted by radiation. Just like an ethernet or Wifi network card, the radios are programmed to ignore all packets they receive which do not start with their spacecraft ID (in the case of computer network cards, you can do some low level stuff to still read those packets, but that's a whole different conversation).
Frequencies
Do spacecraft use the same frequencies? No. They all have slightly different frequencies in the same telecommunication band. For spacecraft which will use the DSN, the frequency must be approved by NASA's frequency allocation office (and this can be a long process).
Spacecraft operators and the DSN are aware of the exact transmission frequency of each spacecraft. The DSN can also correct for expected Doppler shift due to the relative speed of the spacecraft compared to the ground station. DSN is also aware of each critical event of the mission.
If the spacecraft faces an anomaly, the DSN will try to schedule a time slot sooner for engineers to debug the problem. It's also important to note that each DSN site is composed of several antennas, and one antenna can transmit on several slightly different frequencies allowing for mutliplexing of communication by antenna. Whether or not DSN dedicates one antenna to a given spacecraft during a communication pass depends on spacecraft radio power and the criticality of the situation. I believe that for the Phobos Grunt anomaly, DSN would dedicate an antenna to tracking and attempting to communicate with the probe.