To call contract function (read only) you can use
To mutate Ethereum state (transferring value, data) you can use
Edit: The project migrated to https://github.com/ethereum/execution-apis
On both cases the transaction is specific to the smart contract codebase, defined by Solidity compiler. It is usually 32-bit function id followed by 256-bit function arguments.
To encode the payload for the smart contract call you usually use a library like web3.py or web3.js specific to your programming language. The library reads the contract ABI data (JSON) and constructs the function payload call accordingly.
Then the smart contract function entry point reads the data payload and jumps to the function it thinks the data payload was assigned to. If no function match the given function id then the smart contract executes Solidity's fallback function.