Magento started life as a completely free, open-source project. Right now, there's a free version and a paid edition. The latter's price depends on the size of your website's revenues.