When you write a hubpage, there are google ads placed on your hubpage and when a user clicks on an ad, you make money from it. For Amazon, when a user clicks on one of the Amazon ads from your hubpage and buys a product from them, you will receive a commission from them.
You would need to sign up for an account on both Google AdSense and Amazon before you can start making money. Do a search for Google AdSense and Amazon Affiliates to get the URLs to sign up.
The more traffic you can drive to your hubpages, the better the chances that someone will buy a product from amazon and/or click on a google ad.