Assuming you need to replace a headlight and not just a light bulb:
To change the headlight on your 2005 Toyota Matrix, you will first need to open the hood and locate the headlight. On the back of the headlight, there is a power connector that needs to be disconnected. Once that is done, there are usually two screws holding the headlight in place. Take those out and then pull the headlight out. To install the new one, reverse these steps.