I understand what bid and ask are, but I want to know whether they have any expiration date. If both have, what happens when both expire?
The expiry of any bid or ask order will depend on what you specify when you enter the order.
If you enter the order for 'day only' the order will expire at the end of the trading day if it has not been executed. When it expires it will be deleted from the market depth.
If you enter the order to expire on a certain day, if not executed before hand, it will expire and be cancelled by the end of the trading day on the date of expiry.
If you enter the order as 'until cancelled' it will be cancelled either once you cancel it yourself or when there is some corporate action (such as an ex-dividend day).