It's actually the same flight (TK181) which stops first in Mexico City (MEX), and then goes on to Cancun (CUN) after staying 1h30 in MEX.
Depending on the airlines and airports, usually two things can happen:
You stay on board during the stop. This is unlikely for a stop this long after a flight this long, though I have no experience of either TK nor MEX, so I can't say for sure.
You leave the aircraft (but can probably leave your hand luggage in overhead bins — though you must usually take your boarding pass and ID), and re-board the same aircraft after stretching your legs. This is the most plausible IMHO.
Depending on the airport, you may be confined to the departure lounge/gate for the specific flight, or be allowed to visit the rest of the departures area in the terminal.
In both cases, you should keep the same seat for both legs.
Note that on the way back the flight is non-stop from CUN to IST: the aircraft actually flies a triangular route IST-MEX-CUN-IST, so in this direction it's the passengers flying MEX-IST who will have a stop in CUN. It's also the reason it's the same flight number in both directions!
Edit
This blog post states that passengers going to Cancun are actually not allowed to leave the aircraft in MEX:
Once we arrived at the parking place, passengers ticketed only to Mexico city were allowed the disembark. People continuing to Cancun had to stay on the plane and were not allowed into the terminal. I would have preferred to walk around and get a feeling of the terminal, however that was not so.
Once the passengers disembarked cleaning crew came and quickly cleaned the plane. It was quite superficial, understandingly though as half of the plane was full with Cancun bound passengers.
After the cleaning, new passengers for Istanbul boarded the plane.
That's harsh! This was posted in September 2019 so it might have changed since then, but don't hold your breath for that.