I've been looking to buy a new phone recently and I have decided that I want the HTC one mini, because it is small but still a really nice phone. If I buy one online (factory unlocked) would I be able to use it with koodo? how etc?
Yup. It supports the 850/1900 frequencies so you're good to go.
You'll need a micro SIM activated if you don't already have one. If you're already a Koodo customer then you can go to anywhere that sells Koodo and have them swap it for you ($10 for postpaid and $20 for prepaid + tax).
If you're coming in new, then the same procedure applies but make sure to bring IDs with you if you want postpaid service.
If you want data and mms to work, you'll have to make sure you input the APN settings for Koodo under Settings, mobile data, access point names. Look at switch2koodo.com for info on that.
I don't usually suggest phones other than what the person is asking, but I just wanted to point out that Koodo's HTC Desire is almost as good as the One Mini and it actually has a better battery (and costs half as much as the One Mini).
But if you're looking at a smaller premium phone, have you seen the Sony Xperia Z1 Compact? It's due to be released any time now and it's a true high-end product in a smaller phone.