Eggs should be bought from the seller's cooler and kept in the refrigerator, at a temperature between 32°F (0°C) and 40°F (4°C). They should be consumed by the "best before" date on the package, or if there is no date within one week of purchase.
Some sources recommend not using the egg holder that is built into the door of some refrigerators, since the eggs are exposed to warm air each time the door is opened. I'm not sure how much difference that makes to the shelf life, but I still prefer to keep the eggs in their original carton so that I know what the "best before" date is. If you do keep them in the package they came in, never move eggs from an older carton into a newer one. If you do that, you may end up with eggs that have been "upgraded" several times and are no longer safe to eat. I keep my eggs on the lowest shelf, since it is a little cooler than higher shelves.
According to Harold McGee, eggs that are stored on their side have a bit better chance of the yolk being centered when they are hard boiled. If this matters to you, then store the eggs in their original carton but stand the carton on edge.
While there is some romance to the idea of a wire basket of fresh eggs on the counter, this should not be done. Eggs spoil much faster at room temperature. Also, don't buy eggs that have been left out for display, for instance at the local farmer's market, as you don't know how long they have been at room temperature or maybe even warmer.