  We aim to study a one-dimensional $p$-wave superconductor with quasiperiodic
on-site potentials. From the open boundary energy spectra, we find there are
Majorana zero modes, whose corresponding states are symmetrically distributed
at ends of the systems. Further, we numerically calculate the topological
invariant by the Pfaffian, confirming that the Majorana zero modes protected by
the topology. Moreover, the topological phase transition is accompanied by the
energy gap closing. In addition, we numerically find that there are mobility
edges, and we qualitatively analyze the influence of superconducting sequence
parameters and on-site potential strength on it. In general, our work enriches
the study on the $p$-wave superconductor with quasiperiodic potentials.
