Contrary to what many people believe, it is extremely difficult to become a published author. First you need to have a good idea and a well written manuscript that is virtually error free. Next, you need to find a publisher who is willing to take on your work. This is the most difficult step. Many publishers do not accept unsolicited manuscripts. The few that do accept them will at any time, have thousands of manuscripts waiting to be read and request that you send them only the first three chapters of your manuscript and a synopsis of the rest of the story. It is vital that you follow all of the publishers guidelines, or else your work will not be read at all. Once the publisher receives your work, it goes on what is known in the industry as the "slush pile". The slush pile comes second to all other projects that the publisher is currently working on. Most of these manuscripts are eventually read and rejected. Of the thousands of manuscripts on this pile, only one or two will make it all the way to print - usually the ones with the highest level of originality and market appeal.
Your odds of publication increase slightly if you have an agent. However a good agent is difficult to come by. Never take your work to an agent who charges a fee - an agent should work on a commission basis, they are working for you and if they are successful in placing your manuscript with an agent, then they receive a share of your royalties (usually about 10% of your earnings). For this reason, an agent will only take on a manuscript if they are certain that they can place it with a publisher. An agent can also negotiate a better payment for your work than what you could alone.
So yes, it is quite difficult to publish a book. Only a few authors will make it. That does not mean that you wont be one of the lucky ones, but it is important that you know the odds and understand that you will have to work hard and that rejection slips are all part of the process. Sometimes publishers and agents can seem cold, almost callous. They are not attacking your personally. It is just business to them.
As to your other question ... I too found it quite difficult when I was starting to show my family and friends my work. I found this changed over time. Joining a creative writing group is a good place to start - this helps you get used to the idea of others reading and analysing your work. From there, you'll begin to feel more confident about showing others your work.