"Slums" are highly congested urban areas marked by deteriorated, unsanitary buildings, poverty, and social disorganization.
"Squatters" settle on land, especially public or unoccupied land, without right or title. Squatters include those who settles on public land under regulation by the government, in order to get title to it.
Simply out, slums refer to the environmental aspects of the area where a community resides, while squatters refer to the legality of the land ownership and other infrastructure provision.