First things first; a coffee tree in a pot in your apartment takes about 3-4 years of growing before it will start to produce fruit, and maybe a couple more before it makes enough fruit that you can convince yourself you should try harvesting them.
Your future coffee beans first appear as little white flowers, harbingers of caffeine and happiness.
About a month later you will see little green fruit start to emerge where the flowers had been. Now comes the hardest part; it takes up to 6 months for those green fruit to ripen into juicy red berries.
Six. Months. It's agonizing.
But if you are patient, 6 months later, you can harvest to fully ripened berries. They should be a strong, deep red when you harvest them; if in doubt err on the side of waiting a little longer.
So now that we've picked the berries, we can start making the coffee.
First, open the berries. A large, ripe berry will have two coffee beans inside. Smaller berries may just have one. The beans will be nice and slimey when first removed.
Next, wash the beans, then set them in a dish of water to ferment. I've found this process takes about 3-4 days. The beans should start to feel a bit gritty at the end of fermentation. At this point you should throw out any floating beans.
Now we dry the beans. Outside people use the sun. Inside an apartment, a desk lamp might be your best bet. I used a lamp with a compact fluorescent bulb, so it produced fairly minimal heat, but just enough to speed up drying times. Even under the lamp it still takes about 7 days. To find out if they are dry enough, take one bean and open it up, revealing the green inner bean. A sufficiently dry bean will snap in your mouth; if it is chewy then you need to keep drying.
Now that your beans are dry, shell them all, then remove the silvery parchment.
What is left is the actual coffee bean that you consume. They should be a greenish silver color.
Finally it is time to roast the beans. There are many great descriptions of using air-poppers (like for popcorn) to do this well in your house. I did no such thing. The hardest option is to use a frying pan on a stove. This is extra hard if you don't have enough beans to fill the pan, so you cannot stir them well. This was my situation. Again, I do not recommend this method, but it is technically possible. Set the stove to a medium heat and start roasting. It should take about 15-20 minutes if done right. The first time I did this I set the stove to high and immediately burned my beans. You are trying to heat them up, then caramelize the sugar inside. Once the sugar is all caramelized you are done, and any further cooking will burn it. Alternatively, if the pan is too hot they will burn immediately.
This was my final product. You can see how beautifully uneven I was able to roast the beans in a fry pan. Definitely worth the wait!