Most financing in real estate works more or less the same way. Whether it's conventional, commercial, private, hard money, or seller financing, the paperwork and terms are generally spelled out in a mortgage and a promissory note (see: https://www.biggerpockets.com/... for a deeper dive).
That being said, most real estate loans are somewhere between 50% and 80% loan-to-value, meaning the lender wants you to have skin in the game. Using 75% LTV as an example: The lender puts up 75%, and they expect you to put up 25% (as well as have sufficient income from the property, income from other sources, cash reserves, and good credit).
There's not a lot of appetite for "loaning you the down payment" from most lenders. Perhaps friends and family...but keep reading.
If you don't have any capital (not even then down payment), it becomes much more difficult to buy real estate. I'm not saying it's impossible (there are books on the subject sold here on BP), but it is much more difficult.
You might consider bringing in an equity partner (investor), rather than a debt partner (lender). That scenario might look more like the following:
You (Partner A) bring the expertise, time, and hands on management to the table.
Partner B brings capital (cash money, assets, credit history, etc) to the table.
The two of you form a partnership. This can be structured any number of ways, but let's call it A&B Partners LLC, and let's say it's set up with you as a 30% partner and B as a 70% partner.
Your LLC buy's a $1M building. Your LLC owns the building. You own 30% of the LLC.
The LLC's operating agreement will dictate how monthly and annual cash flow and distributions, asset disposal, etc are handled. To keep things simple, it might say "all profit is split 70/30, with an quarterly distribution, and all capital gains are split 70/30".
So each partner would get a quarterly distribution based on net profit. And when you sell the asset 5 years later for $2M, you'd take a $300k gain, and B would take a $700k gain (of the $1M capital gain...$2M sale less the $1M basis).
In this scenario, B is not getting "paid back". Rather, he or she is an equity partner and benefits (in the form of quarterly distributions and a nice capital gain) from you doing the leg work on the property.
If you won the lottery and wanted to buy out B, you could purchase all or part of their share and increase your ownership percentage.