Stock options are a type of benefit that allows you, as an employee, to buy company stock at a certain price. Of course, this option is rarely useful if you have to pay as much for the stock as other investors (unless company stock is very hard to find for sale), so companies typically offer stock discounts to employees. The employee can choose to use the stock option and buy stock or he can do nothing.
Companies add stock options to their benefits to help attract employees who think the business will do well over time. Stock options do not cost the company much to offer--they may have to accept a lower funding amount from stock sales to employees, and there are some management fees involved, but that is all. This makes stock options easy for companies to offer, even when employees are fired or suddenly leave a company.
When an employee leaves a company is very important with regard to stock options. A vesting period is the time you must work for the company before the stock options become exercisable, i.e., before you can use them. Most vesting periods are a few years long. If you leave the company before this vesting period has completed, then you cannot use stock options and they are absorbed back into the company.
If your options have been vested and you are still leaving, then companies typically create a time limit for you to use those options after you no longer work for the company. Typically, you have between three and six months before you lose the options, which again costs the company no money since they were essentially offering a discount on the shares to begin with.
Most companies also have strict rules about competitors. If you leave a company and start to work for one of their competitors, your options will most likely be revoked immediately, so use them before you start working again.