That assumes you already have the Windows 7 installation media and product key.
If you bought a new computer that was inflicted with windows 8 - where do you get the windows 7 installation media and product key. ?
If it has so called downgrade rights - you don't have to pay for another windows license.
I think the OP wants to know how he goes about doing it.
Perhaps the oem who makes the machine you are considering buying will tell you.