Mark price is the fair-value price the exchange uses for unrealized PnL and liquidation.
Index price is built from the prices quoted on several spot exchanges, so one venue's print does not define the reference. Those prices are inputs to the index. They are not a spot order.
Last price, also called the last traded price, is the latest fill on that perpetual's order book.
The three are allowed to differ. Last price moves on every fill, including a small order on a thin book. Index price moves when the spot-exchange prices inside it move. Mark price is the exchange's combination of the index and a basis, which is the gap between the perpetual and the index. The exact blend, the venues inside the index, and the basis formula are published by that exchange. Check the exchange's contract specs.
The glossary defines mark price and index price. How funding rates work is the payment that pulls the perpetual toward the index. On this page, spot means the spot-exchange prices the index is built from. Every example is a perpetual.