Robert E. Lee was born in 1807 in his ancestral home on Stratford Hall Plantation. He was part of the Virginia aristocracy, though his father lost most of the family fortune, and received the usual upbringing and early education of a Southern gentleman. Instead of staying in the South, however, he attended the United States Military Academy at West Point, where he excelled and graduated second in his class.
Ulysses S. Grant was fifteen years younger than Lee and from quite a different background. Whereas Lee's father was an aristocrat in decline, Grant's rose from poverty to become a prosperous leather merchant. Grant also went to West Point, where he was an indifferent student and initially considered leaving. He graduated in the middle of his class, still not fully committed to a military career.
Both Lee and Grant fought and distinguished themselves in the Mexican-American War of 1846–48 and had somewhat checkered civilian careers afterwards, though Lee served as Superintendent of West Point. By the time the Civil War broke out, their positions were practically opposite to one another. Grant struggled to be recommissioned and was eventually made colonel of a regiment. Lee foresaw disaster for the Confederacy and was reluctant to assume the position of general. He even refused to wear the insignia of a general in the Confederate army when he finally accepted the post, preferring the three stars of his rank in the US army, that of colonel.
Despite their different backgrounds, by the time Lee and Grant assumed their positions as leaders of the Confederate and Union armies, they had decades of strategic training behind them, at West Point and in the US, army, which ensured that their general approach was fairly similar. Both were highly competent commanders, respected by their men and their opponents. Lee was the more inspired of the two, with a natural tactical flair, but Grant had more than enough strategic ability to exploit the advantages enjoyed by the Union troops.