Both. All transactions on the network cost gas. Contract deployments often take much more than regular transaction calls to contracts, but some calls can be pretty expensive.
As for actual numbers, here are some.
Deployment: The large parts for contract deployments are
- Tx cost - 21k. This is for all transactions
- Contract creation cost - 32k. This is for the CREATE opcode and transactions with no "to" address, meaning they're contract creation
- Cost per byte of deployed code - 200. This is the cost of every byte of contract bytecode that is deployed. Minimizing this is usually how people minimize deployment costs.
- Constructor - Depends. This is the cost of the constructor, which is often basic code but also often has SSTORE opcodes, which is expensive.
- TX data - 64 bytes for non-zero and 4 bytes for zero. Every byte that is sent in tx data has these costs associated with it. This can be a decent amount for large contract deployments.
Contract calls: These are the costs for ops commonly used in contracts. There's a ton of different opcodes, so I'm just gonna list a few
- Addition/Subtraction/Pop/Push - 3. Pretty self explanatory.
- Multiply/Divide - 5. Also self explanatory.
- Call - 700. Cost of calls into other addresses (usually used for calling code or just sending eth.)
The rest of the opcode costs can be found on pages 24/25 of the yellow paper at https://ethereum.github.io/yellowpaper/paper.pdf.