A mortgage broker works with several lenders and attempts to select the lowest interest rate for the borrower. The broker is usually compensated by the actual lender after you close on the property. A direct lender has a pool of funds from its depositors, stock holders, or bond holders, and lends the funds directly to the borrower.
The pros of direct lenders are that the mortgage approval process will have one less entity involved, and in theory less possibility for problems or issues. The cons of direct lenders are that they may be less flexible in approving your mortgage, and you could be denied a mortgage. Examples include not allowing subjective allowances with your financial ratios, or requiring higher credit scores.
The pros of mortgage brokers are that you may get a better interest rate, and larger brokers may even offer promotional programs such as lower closing costs or smaller down payments. The cons of mortgage brokers include the possibility of miscommunication between the broker and the final lender as they are dealing with many different lenders at the same time. A possible issue with a broker could be losing a lock on an interest rate because the true lender's policies had changed just before you locked, and the broker was unaware.
Another consideration is local vs. national direct lenders or brokers. A non-local broker or direct lender may not be able to find an appraiser during the interest rate lock period as an example, and you could lose your planned interest rate (and due to this you may need to start the process all over again and provide current documentation).