In computations, it is now common to surround artificial boundaries of a computational domain with a perfectly matched layer (PML) of finite thickness in order to prevent artificially reflected waves from contaminating a numerical simulation. Unfortunately, the PML does not give us an indication about appropriate boundary conditions needed to close the edges of the PML, or how those boundary conditions should be enforced in a numerical setting. Terminating the PML with an inappropriate boundary condition or an unstable numerical boundary procedure can lead to exponential growth in the PML which will eventually destroy the accuracy of a numerical simulation everywhere. In this paper, we analyze the stability and the well-posedness of boundary conditions terminating the PML for the elastic wave equation in first order form. First, we consider a vertical modal PML truncating a two space dimensional computational domain in the horizontal direction. We freeze all coefficients and consider a left half-plane problem with linear boundary conditions terminating the PML. The normal mode analysis is used to study the stability and well-posedness of the resulting initial boundary value problem (IBVP). The result is that any linear well-posed boundary condition yielding an energy estimate for the elastic wave equation, without the PML, will also lead to a well-posed IBVP for the PML. Second, we extend the analysis to the PML corner region where both a horizontal and vertical PML are simultaneously active. The challenge lies in constructing accurate and stable numerical approximations for the PML and the boundary conditions. Third, we develop a high order accurate finite difference approximation of the PML subject to the boundary conditions. To enable accurate and stable numerical boundary treatments for the PML we construct continuous energy estimates in the Laplace space for a one space dimensional problem and two space dimensional PML corner problem. We use summation-by-parts finite difference operators to approximate the spatial derivatives and impose boundary conditions weakly using penalties. In order to ensure numerical stability of the discrete PML, it is necessary to extend the numerical boundary procedure to the auxiliary differential equations. This is crucial for deriving discrete energy estimates analogous to the continuous energy estimates. Numerical experiments are presented corroborating the theoretical results. Moreover, in order to ensure longtime numerical stability, the boundary condition closing the PML, or its corresponding discrete implementation, must be dissipative. Furthermore, the numerical experiments demonstrate the stable and robust treatment of PML corners.