Traveling to Mexico:
You are not required to test in order to visit Mexico. You may want to test to make sure you are not leaving as Covid positive. If you are not feeling well, consider changing your plans.
Traveling back to the United States. You are required to test one day prior to returning to the United States and present a negative covid test at the airport to board your flight home. The only exception to that is if you had covid within the past 90 days. Then you have different requirements found on link below.
Here are the guidelines to follow by the CDC: https://www.cdc.gov/coronavirus/2019-ncov/travelers/testing-international-air-travelers.html