A long options trade is entered by buying an options contract and paying the premium to the options seller. If the market then moves in the desired direction, the options contract will come into profit (in the money). There are two different ways that an in the money option can be turned into realized profit. The first is to sell the contract (as with futures contracts) and keep the difference between the buying and selling prices as the profit. Selling an options contract to exit a long trade is safe because the sale is of an already owned contract.
When buying or selling options, the investor or trader has the right to exercise that option at any point up until the expiration date - so simply buying or selling an option doesn't mean you actually have to exercise it at the buy/sell point. Because of this system, options are considered derivative securities - which means their price is derived from something else (in this case, from the value of assets like the market, securities or other underlying instruments). For this reason, options are often considered less risky than stocks (if used correctly).