I've heard that for the first few years, I'll only be paying down the interest of the mortgage, and not the principal
Interest-only mortgages might be available to you, but otherwise that's not correct.
For a repayment mortgage, the lender calculates (on the counter-factual assumption that the interest rate will not change through the life of the mortgage) how much you need to pay each month to ensure that the principal will be paid down to zero after the agreed amortization period. So in the first month the principal is $80k, the interest is some fraction of that, I will call it X. You pay your monthly payment, Y, and Y-X is deducted from the principal.
In the second month the interest is a fraction not of $80k, but of $80k + X - Y. So in the second month the interest is slightly less than X, but your monthly payment is still Y. Thus in the second month the principal is reduced by slightly more than Y-X, and so on. Eventually in the final month of the mortgage you pay off 100% of the remaining principal.
An interest-only mortgage is simply one for which (by agreement with the lender) Y = X. That is, the monthly payments do not pay down the principal, ever. At the end of the mortgage you have to find the full amount loaned, because you still owe the bank the full amount.
If you end a repayment mortgage early then the lender uses this system of regular monthly interest charges and regular monthly payments to calculate your remaining principal. Then they'll add any administration charges or early repayment penalties on top of that calculated principal.
Whenever the interest rate changes (or the mortgage otherwise changes) your monthly payment is re-calculated to still hit your target repayment date, and the bank tells you your new payment.
As an issue of mathematics and in particular the effects of compound interest, it turns out that if the mortgage is amortized over a long period, you don't pay off much in the first 5 years. You do pay off something, but it's small enough that people will say, as an approximation, that in the early years you "don't pay off the principal". soakley shows some example figures, it depends on the interest rate and the repayment period.
So, if it were really true that you only pay off interest in the first 5 years (for example if the mortgage you choose to take is an interest-only mortgage), then at the end of 5 years your equity in the house would be the value of the house less the $80k that you still owe to the bank. Looking at it another way, your equity is your $20k up-front payment plus all of any increase in the value of the house (or minus all of any decrease, as the case may be). Assuming no change in the value of your house: $100k asset minus $80k debt equals $20k equity.
However if you have a repayment mortgage then you will in fact pay off a small amount in the first 5 years and so your equity will be more than $20k assuming no change in the value of the house.
Note also that there's no question of "shares" in the value of the house. People talk about the bank owning 80% of their house but that's not true (except in less common arrangements such as Islamic mortgages). You will own 100% of the house and owe the bank $80k (less whatever you've paid down). That's why all of the increase or decrease in the value of the house is yours.