Hotels typically have their own reward program, which you should absolutely take advantage of. But there are ways to earn frequent flyer miles as well. For example, Hilton actually allows you to double-dip, earning both Hilton reward points and certain airline rewards as well. Alternatively, if you rather airline points, some hotels will give you the choice.
Then, there are booking engines.
Rocket Miles is a new hotel booking engine that gives you a LOT of frequent flyer miles for booking through them. I have noticed however that their prices can be higher than other engines such as Expedia. Before booking a hotel, check the prices on another engine and then decide if it’s worth the amount of points they are giving you. Some bookings can net you up to 7000 Aeroplan points, which is worth around $140!