There are multiple ways to approach this question.. If you mean how can you make yourself emotionally do that, you just have to remind yourself he/she is more likely than not in pain/suffering. It's more inhumane to selfishly keep them alive for your own benefit.
If you mean literally how do you do it, the best choice is to visit a shelter, like S.P.C.A. (Society for the Prevention of Cruelty to Animals). There is almost definately one in your city/town, and euthanization is a surface they provide, generally free, sometimes for a small fee.
If you want to take care of the issue yourself, the most painless way to go about it would be to find yourself a reasonably large supply of helium, and rig up a butterdish to a hose, using ample duct-tape. Apply "facemask" to animal, and slowly turn on the gas. It will take a bit of time, but the animal will simply fall asleep and never wake up. It is completely painless.. for them. I suggest going to a shelter, however. Or a vet.