Grant exited Cold Harbor mid-June 1864 (modern-day Mechanicsburg, VA approximately "2 O'Clock" to Richmond Proper) realizing that it was not worth fighting for given the defenses. He immediately, and brilliantly, outflanked Lee's Army to the East and then marched due south to the James River crossing the river at Weyanoke Point via a hastily built, but extremely strong, Pontoon Bridge, that spanned just under a half-mile (the bridge was built in under a half-a-day -- Grant exited Cold Harbor starting on the evening of 6/12/1864 and crossed the James at Weyanoke Point beginning the afternoon of 6/14/1864 and finished crossing all troops on 6/15/1864).
Grant then marched his troops NW up the south-side of the river and moved on Petersburg. Grant did receive light resistance as he was marching south to James from Beauregard, whose Army was defending Petersburg and the areas south of Richmond (Petersburg was the 2nd largest city in VA at the time and the major rail hub for supplying Richmond with 5 RR Lines nexsusing there.). In any event, Grant received little resistance on his March south, crossing the James or his march toward Petersburg as Beauregard concentrated his efforts on the defenses at Petersburg. When Grant and his Armies assaulted Petersburg, it was clear that the assault would last some time, so Grant made another brilliant move - he set up a massive Union Camp at City Point (modern-day Hopewell, VA) where the Appamatox River dumps into the James River - it is Northeast of Petersburg and as a result Grant's main encampment and HQ (literally a small town, with a bakery, blacksmith shop, etc... was built by the Union forces) was threatening both Richmond and Petersburg at the same time. Grant so surprised Lee with his outflanking maneuvers that Lee's Army did not arrive at Petersburg until a week after Grant's first assault began.
Then, after Grant had the Confederate Armies pinned down defending the eastern line of Richmond and Petersburg, and it was clear Petersburg wasn't going to fall in a short period of time, Grant began taking out the Rail Lines that serviced the cities and all came into Petersburg. First he took out the rail lines on the east and south side of Petersburg, then he began stretching the Confederate's lines west ultimately taking out the last rail line (5 in total) which was "9 O'Clock" to Petersburg. Grant had also called the Army of the Shanindoah, commanded by Sheridan at this point (March 1865), east to Petersburg to attack the Confederate's over-stretched lines West of Petersburg. On April 2nd, one of Sheridan's Divisions broke the Confederate's line and the Battle was over - the overstretched Confederates went into full retreat and Lee immediately began evacuating Richmond. Lee's plan was to meet up with his Army of North Carolina (he was going to try and flee west and then south in the hope that he would not be aggressively pursued (i.e., like his retreat from Gettysburg). Grant made sure this did not happen as he told Sheridan to immediately pursue him and cutoff his retreat as soon as feasibly possible, which Sheridan did in the ensuing altercation to the west called Sailor's Creek, which took place on April 6, 1865 only 3 days after Lee's hasty retreat from Richmond. Again, Lee lost a massive chunk of his Army at Sailor's Creek - 8,800 (7,700 surrendered - one of the Officer's who surrendered was Lee's son). The war was over - Lee was completely and abjectly defeated.
The Southern rationalizes refuse to accept the FACT that Lee's Army never defeated Grant's in any major engagement (i.e., forced "retreat" of their Army). At the Wilderness, Lee fought Grant to a standstill (i.e., "a draw"), but then was outflanked by Grant to the east (and then Grant continued South threatening Richmond leading to the Battle of Spotsylvania). The fighting lasted almost 2 weeks, but ultimately Lee withdrew south to protect Richmond. This theme would play out again at Cold Harbor and lead to Petersburg....and ultimately the fall of Richmond and the end of the war at Sailor's Creek. There is no doubt that Grant was a masterful "Chess Player" in the heat of the battle, while Lee was able to parry some of his moves, he was completely unable to anticipate his next lethal move, which ultimately proved to be the difference between Grant and the other Union commanders in defeating Lee - Grant was always on the offensive, uber aggressive and an incredibly ingenious tactician.