A hatchback is a car body configuration with a rear door that swings upwards, providing access to a cargo area that is integrated with the passenger compartment. Hatchbacks usually have two or four doors for passenger access, and the rear door is typically made of glass. Hatchbacks are often smaller and more affordable than sedans, and they offer more cargo space than sedans with the rear seats folded down.
Sedan:
A sedan is a car body configuration with a fixed roof, four doors for passenger access, and a separate trunk that is not integrated with the passenger compartment. Sedans typically have a longer wheelbase than hatchbacks, and they offer more legroom for rear passengers. Sedans are often larger and more expensive than hatchbacks, and they offer less cargo space than hatchbacks with the rear seats folded down.
In summary, hatchbacks are smaller and more affordable cars with a rear door that swings upwards and integrated cargo space, while sedans are larger and more expensive cars with a fixed roof, four doors, and a separate trunk.