If you own iLife '11 or iWork ’09 apps for the Mac but did not purchase them from the Mac App Store: You should be able to download the latest versions for free by going to the Mac App Store and tapping Update, though you may need to first visit the Purchases screen, where you might see a box called “You Have [number] Apps to Accept.” This ties apps you have on your computer to both your Apple ID and a hardware identifier on your computer, and it should allow you to download free updates to these programs from any computer associated with your Apple ID.
Some users (including yours truly) are reporting issues where the Mac App Store doesn’t recognize their copies; when they click on an iLife or iWork app’s price, they receive the following alert: “[App] is already installed and was not purchased from the Mac App Store. Do you want to buy [app]?” Macworld spoke with an Apple spokesperson who noted that there’s currently an issue with some legacy customers, and the company is working on a fix.
If you don’t own iLife '11 or iWork '09 apps (or v1 iOS apps), or own older Mac versions: On the iLife side, you’ll have to buy iMovie and iPhoto at full price ($15 or $5, depending on platform). GarageBand is free for everyone to download, though the app does offer in-app purchases. Apple’s iWork apps are each $20 for the Mac, $10 on the iPhone or iPad.
If you are buying a new Mac or iOS device: After you set up your device, you should be able to download the latest versions for free by going to their entry in the Mac or iOS App Store. According to Apple’s website, anyone who purchased a new Mac or iOS device after October 1 is eligible.