A stockbroker is the middle man in any exchange of securities between two parties. Put simply, he is the guy that runs between the company you wish to invest (in the event you are trading stocks) in and yourself. Their job is not to give advice on the topics of which stocks you buy; however, if you choose the right broker they can help you make an informed choice as they are well aware of stock market trends as they are coming and going. Whilst a broker may not have contact with the person in charge of delegating stocks to individuals for any particular company, they have access to area of the stock exchange where trades take place.
A stockbroker generally charges a percentage of what you wish to spend on any given stock. Some brokers may even charge you a percentage of the profits that you have made on any specific sale. While they a working as a free agent (or part of a brokerage) they have no say on what specific stocks you buy and when. Their job is to make the sale. Although if they offer you advice it is generally best to take it because they know the industry better than most people because it is their job to mediate between buyers and sellers.
Stockbrokers are required to follow specific regulations and are generally required to be licensed. This is in part to help protect traders but it also helps protects the companies. Whilst stockbrokers are not investment advisors or financial advisors as such; they can play these roles if the broker is qualified enough. Brokers can also be delegated power over your portfolio in order to make financial decisions on your behalf. They are there to make your job easier when you trade on the stock market. However, with the advent of electronic stock trading the reliance on stockbrokers is become less and less.