Waste and contaminated water removed
The liquid and solids come out first, along with carpet, pad, and any absorbent contents that were in contact with them.
A backup out of a basement floor drain or toilet is a health problem, not just a mess. An independent restoration provider can remove the waste and the materials it soaked, clean and disinfect the area, then dry it.
Older parts of the city still have clay sewer lines, and cottonwood, elm and silver maple roots find the joints in them. Once roots or grease narrow the line, the first thing to back up is the lowest opening in the house, which is usually the basement floor drain. Heavy storms can surcharge a public line and push water the same direction.
Until a provider is on site: stop using water anywhere in the house, keep children and pets out of the room, wear gloves and boots if you must go in, and do not run the heating and cooling system, which can carry contamination into the rest of the house. Do not try to clean it with a household vacuum.

Contaminated water is handled under stricter rules than clean water, and most porous material it touched is removed rather than dried.
The liquid and solids come out first, along with carpet, pad, and any absorbent contents that were in contact with them.
Drywall, insulation and base cabinets that wicked contaminated water are removed to a line above the wet area rather than dried in place.
Hard surfaces are cleaned and treated with an appropriate product, then the structure is dried with readings taken until it is back to normal.
Cleanup does not fix the line. If the backup came from roots, a collapsed clay section or a blockage, a drain contractor needs to camera the line and clear or repair it, or the same thing happens again after the next heavy use or storm.
Once the contaminated material is out, the room still has to be dried properly, which is covered on the structural drying page. If the backup went unnoticed for days, ask about mold remediation as well.
What can stay and what has to go is the main cost question here; the dry and restore versus replace guide explains why contaminated water shifts that answer. Storm-driven backups are also covered under storm and flood cleanup, and you can arrange a visit by phone.
Treat it as a biohazard. Keep people and pets out of the area, wear gloves if you have to enter, wash thoroughly afterwards, and leave the heating and cooling system off so nothing is drawn into the ducts.
Carpet and pad that took contaminated water are normally removed. Drywall and insulation that wicked it are cut out above the line it reached. Hard, non-porous surfaces can usually be cleaned and kept.
It depends on the area affected, how much porous material has to be removed and how far the water traveled. Ask the independent provider to quote the work after seeing the room.
That usually points to a blocked or damaged line, or to a public sewer under heavy load during a storm. The cleanup and the cause are separate jobs, and a provider can tell you which specialist you need next.
Call and describe where the water is and how long it has run so a provider can assess the job.