A transaction is a record containing information: how much money (amount) needs to be transferred, from which address (sender), to which address (recipient) and what transaction fee. The transaction also contains the hash signature of the sender. The signature is generated by the sender (owner of the address) using private key corresponding to this address (of the sender).
The cryptographic algorithm allows anyone to verify whether this signature is true.