Buy freshly roasted beans. Coffee begins to age the moment it hits the roaster's cooling tray.
Use the proper grind for the brewing method of your choice.
Use fresh, cold water, preferably filtered.
Make sure that your brewing water has reached an optimum temperature of 185-195.
Always store your coffee in an air tight container.