The central purpose of this paper is to explore the nonlinear dynamics of the (2+1)-dimensional Kadomtsev–Petviashvili equation (KPE). The multiple soliton solutions (MSSs) are constructed via applying the Hirota method. Then the soliton molecules on the ([Formula: see text]-, ([Formula: see text]- and ([Formula: see text]-planes are extracted via imposing the velocity resonance conditions to the MSSs. Eventually, two effective techniques, the sub-equation approach (SEA) and the variational approach (VA), are employed to probe some other diverse wave solutions, which are the bright wave, dark wave, singular wave and the singular periodic wave solutions. The dynamics of the extracted solutions are unveiled graphically to exhibit the physical attributes. The attained solutions in this paper can enlarge the exact solutions of the (2+1)-dimensional KPE and enable us to understand the nonlinear dynamic behaviors better.