I don't get this cloud mining

So let's say I buy 1TH/s, that's worth
BTC2.9 then I mine for 30 days. Then after that, I don't want to mine anymore.
Do I get my
BTC2.9 back plus my earnings from mining??
It varies by vendor, but in this case you are buying a 5 year mining contract.