Cut the Hole
Consult the directions that come with your pet door before cutting anything, and take extra care to cut the hole at the exact dimensions recommended by the door manufacturer. Be sure that the door you buy is made for installation into a wall. These doors are quite different than the pet doors that are installed in doors; the flanges need to be much wider for walls.
Mark the four corners of the hole you want to cut on the outside of the brick wall with a magic marker, and connect the dots with straight lines using a straight edge. Using a drill bit that is long enough to reach through the wall, drill straight through the wall at the four corners you have marked. Keep the drill straight and level so that the holes go straight through the wall.
Connect the four resulting holes on the inside of the wall using the marker and straight edge. Cut the drywall away from the inside wall. Be sure there are no wires or other obstructions blocking your hole. Remove any insulation from inside the wall.
Cut into the brick on the outside of the wall using a circular saw with a brick cutting blade installed. Don't overcut the corners of the hole or you will leave unsightly saw marks around your pet door.
Knock the brick out of the hole and clean up the edges using a cold chisel.
Install the Door
Install the interior and exterior flanges for the pet door into the hole you have made. Depending on the type of door you have, these flanges will either snap together or will need to be screwed to each other or to the wall.
Install the pet door into the flanges after they are installed in the hole. Consult the directions that come with the door for specific directions on how to accomplish this, as different doors have different methods of attaching the door to the flanges.
Test the door with your hand to be sure that is swings freely inwards and outwards.
Introduce your pet to the door and encourage them to go in and out a few times to get them used to it.