As others have said it depends on how long you were employed.
Typically options and RSUs have a 4 year beating schedule with a one year cliff. Meaning that after 1 year you have earned 25% of your options with the remaining 75% vesting monthly over the next 3 years.
Also, once you leave a company you have a limited time to exercise/sell your vested shares. Usually 90 days.
1. Check your paperwork. It probably won't be in your employment contract, but in a separate equity agreement. It will provide detail on how/when equity vests as well as scenarios if you leave on your own will, if you are terminated, or if there are layoffs.
2. In that agreement, it will state your share/equity allocation. It will also state a Vesting Schedule. Many times its 25% immediately, after the first 6 months, or after a year. Then 15%/year for the next 5 years.
3. You WILL have to purchase any vested equity, equity isn't handed to you. So, whatever percentage of shares are vested, you will have to pay for the original value of those shares, as well as the tax liability of the profit between your exercise price and the current valuation of the company.
4. As @saaskicker stated - it might not be the best idea to buy shares of a company going through layoffs.
Regardless - you should have all the information available to you. Best of luck in making the correct decision for you and best of luck looking for a new role.
Lot of good comments here- there is also some great equity explanation content on YT. I won't plug any companies here but its worth listening to a 15 min explanation of the basics as you'll learn stuff that will help when you negotiate your next job.