If you want to experiment, you should just check out the testnet:
https://en.bitcoin.it/wiki/Testnetit's a separate testing bitcoin blockchain. you can get test coins from bitcoin testnet faucets (see link above).
If you want to try out Ethereum and write a smart contract, you want to test it for free so not on the real ethereum chain. Same principle, you can just try your smart contract on the Ethereum testnet (ropsten I think but whatever) for which you can get test ether from ethereum testnet faucets (faucet being the keyword you want to get free test coins for various blockchains)
cheers