As already pointed out, smart contracts are programs.
But unlike regular programs they also holds a balance of tokens on the blockchain.
Actually, they can hold any data they want, like (but not limited to) :
How much tokens were already created (minted) - this is called total supply.
The list of addresses that minted the token to and their balance.