Math. Really, really hard math.
Each bitcoin represents a solution to a really difficult computation. New bitcoins are created only by performing this computation, called 'mining', and adding each 'block' of bitcoins so discovered to a public ledger, the 'block chain', with a cryptographic hash of the previous block in the chain, the block itself, and a cryptographic nonce, or single-use authentication number. The size of the nonce increases over time, such that the computation time needed for the bitcoin network to produce a new nonce is always about 10 minutes. The number of bitcoins associated with each new block will decrease over time, until circa 2140, where the limit of 21 million bitcoins will be reached. There are currently about 13.5 million bitcoins in circulation.
Someone trying to pad their account with zeros will find that their bitcoins don't match any block in the block chain, and are not valid. Vendors being paid in these counterfeit bitcoins will automatically reject them, as the open source transaction processing software finds no block chain entries for the coins.
A successful transaction updates the block chain for the bitcoins, preventing 'double spending', or trying to use the same bitcoin with two different sellers. A sane vendor will not transfer merchandise until the bitcoin payment appears in the block chain.
The 'core program' is open source.