There are a few orbiters around Mars. NASA appears to have an arrangement with the ESA to upload data from the rovers to the ESA's orbiters, depending on whose orbiters are within line of sight at any given time. Then the orbiter sends the information back to Earth, which are received by NASA's Deep Space Network
During the time when line of sight between Earth and Mars is blocked by Sol, there isn't any communication.
May interest you: https://mars.nasa.gov/mars2020/spacecraft/rover/communicatio...