I just put ground coffee beans in coconut oil (the oil doesn't really matter) and let it sit for about a month in a sunny room before straining it into another jar. You don't have to leave it for so long, most tutorials suggest you only need 2 weeks. Before you strain it, make sure to shake it up well, there's going to be a thick brown layer at the bottom of the jar, which is the extra good stuff. Also leave it to strain for a while and really squeeze as much as you can from the beans.
Alternatively, I've heard that you can also just put the beans and oil in a crockpot and leave it for several hours. I've never tried it, but maybe one day I'll get a crockpot for my infusions.