The distance between Hanoi and Moc Chau is 190 km, so it takes around 4 to 5 hours to get there. Every day a number of buses leave for Moc Chau. Most start from the My Dinh bus station in Hanoi. All buses to Son La and Dien Bien Phu also always pass by Moc Chau.
Alternatively you can take a direct tourist minibus including pick up and drop off at your accommodation.