Always buy whole bean and grind yourself immediately before preparation. As a general guideline, you should be consuming the coffee within a month of the roasted date.
In addition to the country of origin, pay attention to the varietal (caturra, catuai, bourbon, harar, marargogipe, &c) and especially the bean processing type, of which there are three primary methods: dry/natural, honey/pulped, wet/washed. These factors have a big impact on the flavor profiles and body (viscosity) of the coffee and noting them will help you zero in on what types of coffees you will like.
Water - Coffee is made from just two ingredients: coffee beans and water. Every type of unmixed brewed/extracted coffee beverage is over 95% water. Many people ignore it for some reason. The science behind what makes for ideal water is actually very complex. I'm not going to type out all the details because it would be a novel. If you think your water might be an issue, I'll save you some time and say just brew with Volvic water and see if you notice a difference. There is nothing magic about Volvic - it is just a commonly available water that has all the properties in the range suited for great coffee preparation and equipment protection (i.e. it won't scale). DO NOT use straight Texas tap water in an espresso machine. It will scale.
http://volvic-na.com/
(disclaimer: I have no commercial investment or interest in Volvic and no affiliation with them).
Drip Coffee Preparation - This is the typical way most Americans prepare and drink coffee. It's actually a pretty forgiving process and has a wide margin of error because it produces a dilute beverage at low pressure. Beyond the bean selection, the main things to focus on is the water to coffee mass ratio and extraction time. A good guideline to start with on ratio is a water to coffee mass ratio of 18:1 (55 g of coffee per liter of water). From there you can make it stronger or weaker to taste. Extraction time for drip should be between 4-6 minutes. Once you have the mass ratio you prefer, you control the extraction time with your grind level (finer grinds lengthen the extraction time). Water temps for extraction should be between 195 and 205 F. This should be controlled by your machine; this is pretty much the only thing a drip machine needs to get right (along with having a basket large enough to achieve the desired coffee to water ratio; sometimes they are too small); most are pretty decent at hitting this temp range, so if it's not it is either broken or just a crap machine. Either way, get a new one if this is a problem. If you want to get into more details on the brewing, visit the SCAA website:
http://www.scaa.org/?page=resources&d=brewing-standards
Espresso Preparation - Compared to drip coffee, proper espresso preparation is difficult and has a very small margin for error. This is because it is very concentrated (so any flaw is magnified) and it is brewed under pressure (8-10 atmospheres). The biggest thing to focus on is mass ratio and extraction time. For mass ratio, start with 7-9 grams per 30 ml (1 fluid ounce). Extraction time should be 25-30 seconds. Once you get the mass dialed in, you adjust extraction time by the grinder setting. You need a stepless burr grinder for good espresso preparation. I prefer conical burr grinders, but flat burrs work well too. At the house I use a Lelit PL53.
Lots of folks focus on the espresso machine itself, but I've had great espresso from just about every machine imaginable. A high end machine gets you more thermal stability over a large number of shots (which is typically only needed in a commercial setting) and better milk steaming/texturing for making microfoam. Most home machines are crappy at making quality microfoam. Microfoam is the steamed milk that almost looks like wet paint that high end shops serve, typically with hearts and fern leaf art showing off the milk prep. This is very hard to reproduce at the house. But if you are interested in making a just few straight shots of espresso per day, almost any espresso machine will work and a high end machine won't produce a notable difference.
On tamping, the main thing is that it needs to be level. Don't focus too much on the force; anywhere from 15-40 lbs is fine (I normally aim for the lower end because there is no need to go higher). Just do a good firm tamp. Again, focus more on it being level than the amount of force. Non-level tamps can produce channeling, which is when the water doesn't flow through the coffee cake evening and forms channels.
I'm tired of typing and can't think of anything else at the moment. Ask me any questions if you like and I'll do my best to answer. I have no interest in promoting my products; in fact I will not name mine or promote them in any way on here, because then it would just become work and I don't come to the internet for work. I just like to talk coffee.