A transaction input will reference the transaction which created it, via the transaction ID and the output index. So a full node will just look up that entry in the UTXO index, ensuring it exists and is being used validly.