I would personally get a Ruger 10/.22 for a beginner. I know its a smaller round, but the rifle costs about $150 at most and the ammo is dirt cheap-it is the best way to learn.
That's excellent advice. The Ruger 10/22 is well made, accurate and very affordable to practice with. Unless it's abused, it's the type of rifle that can end up serving your great grandson.
For serious, long-range marksmanship, there are so many suitable rifles and calibers, it's really about how much you can spend and whether or not you ever decide to take up the equally rewarding hobby; reloading your own ammunition.
Ruger also makes some incredibly accurate, affordable, center-fire rifles..
http://www.ruger-firearms.com/Firearms/FAProdEnlView?model=7886Thw M77 MKII has a solid, precise bolt/reciever.. better than rifles costing three times as much and a heavy barrel (reduces oscillation (a barrel actually goes through a sine-wave oscillation before the bullet exits.. and if it's not minimized and predictable can significantly alter the trajectory)).
The minimun standard for a target rifle is; "one minute of angle @ 100 meters" .. which equates to 1" @ 100 meters between impact centers. The M77 MKII in calber .243, with a good scope is capable of much better. Three shot "clover leaf" patterns are the norm. If you take the time to experiment and find a load/bullet combo that suits your particular rifle.. an afternoon of shooting will yield a few 3-shot groups through one hole.
Handgun marksmanship is a whole different arena. Since most people will expect their target handgun to double as their home defense tool , there are really only 4 caliber choices: 9mm, 38/.357, .40S&W and .45ACP .
44Magnum and 10mm are a little too much for the average person, unless they're willing to practice regularly. Recoil is substantial and over-penetration is a concern.
If you don't plan on practicing regularly; I'd recommend a 38/357 revolver. Revolvers are inherently safer than auto-loaders.. rarely malfunction and a 38/357 has the flexibility of using .38special ammuntion for target and practice (light recoil and inexpensive).. and .357Magnum ammunition for home defense.
I'm not a fan of 9mm at all. It and most of the guns chambered for it are poor choices for marksmanship. And as a self-defense round, it's a notorious flop. There aren't but a few police departments still using 9mm. All that experiment with it end up switching to .45ACP or .40S&W as soon as it becomes economically feasible.
If you DO intent to keep up on your proficiency and choose a semi-auto pistol; I'd advise a "single action only". To me.. the whole purpuse of a semi-auto pistol is to get away from long, heavy trigger-pull (like a revolver (unless you take the time to "cock" it for every shot (the exact thing the semi-auto was designed to eliminate)). The best choice there (in my opinion) is a Browning Hi-Power in .40S&W, but it's rather pricey; as is my second choice, a Colt Government Model in .45ACP. Springfield Armory makes an excellent Colt clone and is reasonably priced.
Consider used firearms from reputable dealers until you settle on a choice. You can always trade up.