What are smart contracts?
are they some kind of contracts we do in a day to day life? no
smart contracts are simply the code that is deployed on the blockchain.
solidity code → machine code → deployed on the blockchain
flow of smart contracts:
- compile the solidity code into byte-code
- send a transaction containing the byte-code to an evm node
- the node calculates an address for your smart contract

below solidity compiler there is creation-bytecode and at the node you are seeing the run time bye code.
byte code has op codes (when you write uint a + b, it gets converted into something like a 0x01 b) and each opcode needs specific amount of gas you need to pay as the network fee
