In this paper,we investigate the procedure to discretize Poisson equation with Dirichelet boundary conditions by fourth-order compact finite difference scheme.In particular,we study how to apply the fourth-order compact finite difference scheme to discretize the one-dimensional and two-dimensional Poisson equation.For comparison,we also solve both the one-dimensional and two-dimensional Poisson equation with central finite difference method.We find that the numerical accuracies obtained by both methods agree with the theoretical predication.But the orders of the computational accuracy obtained by the compact finite difference method are higher than those obtained by the central finite difference method.For those examples that need to be solved by high-order accuracy method,the fourth-order compact finite difference scheme will have a big advantage.