On the expiry date, one of three things happens:
If your option is profitable - if a Going Up option and the stock is above the break-even price, your option has value. If it is above a minimum threshold set by the exchange, it will be automatically exercised. You will receive the profit in your account.
If your option is near break-even - the outcome depends on the exact closing price. You may receive a small amount, break even, or lose a small portion of what you paid.
If your option is not profitable - if the stock has not moved enough in your direction, your option expires worthless and you lose the amount you paid to enter. The position is removed from your portfolio automatically.