Master Lease? Please help

what is Master leasing an apartment building? How do you do this and what does the purchase agreement look like? I have heard of a Peter Conti using this technique to take over apartments small and large with little to no money. Just looking for a few educated answers.

When you take out a master lease, you are leasing the entire building and are responsible for all the expenses and responsible for the behavior of the tenants.

You then sub-lease the apartments or shops to the tenants of your own choosing and whatever deal you make with the tenants is between you and the tenants.