In the past several decades, multiscale modeling and simulation (MMS) has attracted many interests and demonstrated its power in many applications. However, there are still issues remaining in MMS which are the bottlenecks for its full application. With the help of machine learning techniques, I will demonstrate a couple of examples in the efforts of resolving these issues. Namely, I will show our recent work of deriving macroscopic constitutive relations from microscopic models based on learning techniques as well as learning boundary conditions.