To call contract function (read only) you can use 

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_call

To mutate Ethereum state (transferring value, data) you can use 

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction

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.