A real estate professional can help "pre-qualify" you for a mortgage before you start house-hunting. This process includes analyzing your income, assets and present debt to estimate what you may be able to afford on a house purchase. Mortgage brokers, or a lender's own mortgage counselors can also calculate the same sort of informal estimate for you.
Obtaining mortgage "pre-approval" is another thing entirely. It means that you have in hand a lender's written commitment to put together a loan for you (subject only to the particular house you want to buy passing the lender's appraisal).
Pre-approval makes you a strong buyer, welcomed by sellers. With most other purchasers, sellers must tie the house up on a contract while waiting to see if the would-be buyer can really obtain financing.
The down side is that you may pay application fees to cover the lender's paperwork in verifying your employment, income, assets, debts and credit rating. If you later decide not to use that particular lender, you'd have to start all over again elsewhere - with no rebate.
Pre-approval will also speed up the entire mortgage procedure once you've found the house you want. The only remaining question will be whether the house will "appraise" for enough to warrant the loan.