A numerical study is described to investigate the response of premixed flames to externally imposed pressure perturbations. The complete set of unsteady compressible Navier-Stokes equations for a multicomponent chemically reacting fluid flow are solved. Chemical reactions for methane-air flames are described using a detailed set of finite rate reactions kinetics. First a burner stabilized steady premixed flame is numerically simulated. These results are then compared with experimental results. We next study the response of this flame to a variety of pressure waves originating in the hot equilibrium products and traveling towards the premixed flame. The entire spectrum of frequency is investigated but emphasis is laid on pressure waves that have characteristic length scales of the order of the typical diffusion length scale. It is shown that the flame responds to pressure perturbations by relocating itself at a new location, and that the structure of the transmitted waves and reflected waves is significantly different from that of the incident wave. The response of the flame is studied using the profiles of the heat release rate per unit volume, and the location is determined by the location of the maximum of the intermediate species. We then show a case where such flame could undergo extinction under the influence of continuous pressure perturbations.