Reservations (or Reserve in Canadian English) were originally areas of land set off by the US and Canadian Governments to enclose Native American people providing safety and land for American and Canadian settlers. Later, Native Americans were granted the legal ability to leave the reservation, were considered full American Citizens, and the reservations themselves became more of a "homeland" for Indian tribes, with special legal protections.
Indian reservations were originally under the full control of the US Government, via the Bureau of Indian Affairs, Department of the Interior.
After the Indian Reorganization Act, tribal councils took control over most aspects of individual Tribal Reservations (under the approval of the Department of the Interior). Generally, each reservation has its own legal codes, as well as a legal system with law enforcement department, and a judicial system.