Funds for closing costs must be from an "allowable source" and properly documented. Unsecured borrowed funds are not allowable, such as a personal loan or advances from a credit card. Secured, borrowed funds are allowable. For example, a consumer can get a personal loan against the equity in a home they own to buy another home. There needs to be a note with monthly payments and a recorded deed of trust securing the note against the property. Evidence of receipt of the loan proceeds in the consumers bank account or in escrow is required. The consumer could also tap Home Equity Credit Line (HELOC) against a property they own. The payment on the secured, borrowed funds will be used in qualifying the consumer.
Thinking about buying a home? First thing a buyer should do is get pre-approved with a local lender. Next, start a relationship with a Realtor. I would recommend one with experience in the area you are looking and an experienced buyers agent. Not all agents are the same, choose wisely. Ask friends, family, or co-workers for referrals. Same thing for lenders. Or you can consider another source like Yelp or Zillow.com reviews.
Good luck, remember buying a home should not only be an exciting but an educational experience.