Harvard University is located in Cambridge, Massachusetts, and MIT is located in Boston. The distance between the two universities is about 3 miles (about 4.8 kilometers), and it takes about 1 hour to walk.
You can take the red line subway to the central square where MIT is located, which takes about 10 minutes. It takes about 10- 15 minutes to walk from the central square to the main campus of MIT.