There are 2 main types of brokers, full service and online (or discount). Basically the full service can provide you with advice in the form of recommendations on what to buy and sell and when, you call them up when you want to put an order in and the commissions are usually higher. Whilst an online broker usually doesn't provide advice (unless you ask for it at a specified fee), you place your orders online through the brokers website or trading platform and the commissions are usually much lower.
The best thing to do when starting off is to go to your country's stock exchange, for example, The ASX in Sydney Australia, and they should have a list of available brokers. Some of the online brokers may have a practice or simulation account you can practice on, and they usually provide good educational material to help you get started.
If you went with an online broker and wanted to buy Facebook on the secondary market (that is on the stock exchange after the IPO closes), you would log onto your brokers website or platform and go to the orders section. You would place a new order to buy say 100 Facebook shares at a certain price. You can use a market order, meaning the order will be immediately executed at the current market price and you will own the shares, or a limit price order where you select a price below the current market price and wait for the price to come down and hit your limit price before your order is executed and you get your shares. There are other types of orders available with different brokers which you will learn about when you log onto their website.
You also need to be careful that you have the funds available to pay for the share at settlement, which is 3 business days after your order was executed. Some brokers may require you to have the funds deposited into an account which is linked to your trading account with them.
To sell your shares you do the same thing, except this time you choose a sell order instead of a buy order. It becomes quite simple once you have done it a couple of times. The best thing is to do some research and get started.