what is the difference between legal discrmination and institutionalized discrimination?

Legal discrimination is permitted by law. The Jim Crow laws of the Southern states before the Civil Rights Amendment were legalized discrimination.

Institutionalized discrimination is discrimination based on custom -- such as segregated neighborhoods.