This paper deals with M-soliton solution of the (2 + 1)-dimensional variable-coefficient Kadomtsev-Petviashvili equation by virtue of the Hirota bilinear operator method. The obtained solutions for solving the current equation represent some localized waves including soliton, periodic and cross-kink solutions, which have been investigated by the approach of the bilinear method. Mainly, by choosing specific parameter constraints in the M-soliton solutions, all cases of the periodic and cross-kink solutions can be captured from the one-, two- and three-soliton solutions. The obtained solutions are extended with numerical simulation to analyze graphically, which results into one-, twoand three-soliton solutions and also periodic and cross-kink solutions profiles. That will be extensively used to report many attractive physical phenomena in the fields of acoustics, heat transfer, fluid dynamics, classical mechanics and so on.