First, you get pre approved for a loan. The lender will give you an estimate of these fees that you'll be paying right before it closes. There are several different kinds of loans, depending on your qualifications and the property.
Generally, there is the FHA loan that requires 3.5% downpayment or there is the conventional loan with 20% downpayment. There is also a VA loan called a VA no no which is zero down. However, there are constantly new loans coming on the market with various amounts of downpayment. A knowledgeable lender will be able to help you find the one that is right for you. This is an important first step because in this market, your pre-approval letter is requred to be submitted with your offer or they won't consider your offer.
Next, when you find the right home, you will need to include an "Earnest Money Deposit" (your "skin in the game"). This is generally 1-3% of the sales price. If you have competition and really want the house, it can be helpful to make it closer to a 3% EMD. It can make your offer seem more solid. The deposit is part of the overall downpayment. It is held uncashed until your offer is accepted. Escrow will deposit it into an account when they receive it; usually within 3 days of offer acceptance.
Once your offer is accepted,the contract allows you a period of time to get a home inspection and do any fact finding you'd like before making your final commitment (your inspection contingency). The home inspector will usually want you to give them a check at the time of the inspection ranging from around $200-$600, depending on the inspector, the house and the area.
After that, you just wait until everyone completes their job during escrow. Within the last few days, they'll "draw docs" (loan documents) and you'll be called in to bring the money you owe for downpayment and costs & sign the loan documents. They will let you know the exact figures when setting up this appointment. They should be close to the estimate the lender gave you up front.