Nanobubbles appearing on the interface between liquid and the hydrophobic substrate play an important role in various natural and industrial processes. They are widely studied due to their important role in micro- and nanodynamics of dispersed systems, cavitation, etc. Despite the fact that several hypothesis concerning their existence is described in literature, the deep understanding of this phenomenon has not been reached. Similar comments are related to the understanding of the homogeneous and heterogeneous nucleation, which is being the inception point for cavitation and boiling. The experiments are very difficult and expensive, therefore the molecular dynamics (MD) simulations have become one of the most powerful techniques for this type of study.The current study presents the MD simulations of the multi-component systems of non-polar molecules, which interactions are described by the Lennard-Jones potential, and the systems of polar molecules, such as water, which include the long-range Coulomb interactions. The MD computation are very expensive, that’s why we apply both algorithmic and hardware approaches to speed-up the computations. The first one is based on the reduction of the computational cost of the algorithms while the second one is based on the use of the heterogeneous high-performance hardware, consisting of graphic and central processors (GPU and CPU respectively). The use of the heterogeneous systems allows significant modifications and the development of the new algorithms. For the near-field interactions the new data structure reducing the computational cost from square to the linear one was developed and implemented. The calculations of the far-field interactions were accelerated by the Fast Multipole Method which is one of the most efficient algorithms for the fast matrix-vector multiplications based on the spatial decomposition. All the algorithms were developed for one or several GPUs. Here we present the numerical simulations of the homogeneous nucleation of the non-polar fluids such as Argon. It is shown that the tensile strength computed by the means of the MD simulations is in good agreement with the data obtained using the Redlich-Kwong equation of state. The heterogeneous nucleation is studied for the systems containing the solid particle. The tensile strength is studied as a function of the particle size. We also calculated surface nanobubbles. The contact angle and the bubble volume are studied. This study is supported by Grant of Ministry of Education and Science of the Russian Federation (11.G34.31.0040).