What are the broader structural mechanisms which create mass detention and deportation?

What are the broader structural mechanisms which create mass detention and deportation? Who are the people that are being detained and deported? Examine different cases if possible; Please use a simple writing style for high school kids to learn.