The last train of the day (also called 'shūden'); missing it often means taking a taxi or staying overnight.
飲み会が長引いて、最終電車に間に合わなかった。
The drinking party ran late and I missed the last train.
終電を確認してから帰宅するように気をつけている。
I make sure to check the last train before going home.
この路線の最終電車は23時45分発です。
The last train on this line departs at 23:45.