You have a three way dimmer system which is going to consist of two switches yea'. Each of your ol switches shood look like this; bare grounds/green wire nutted and on switch ground, white wires nutted in a joint not connected to the switch, then on your tree way switch you have a common terminal (one switch containing power in and the other switch common containing power out to the light), then you have two travelers usually on the bottom of each switch that let power back and forth between the switches. The travelers and power in and out tend to be one black on the common and a blackNred for travelers, tho this can change.
So basically you wanna get your instructions on the back of the dimmer box and look which wires to connect your dimmer to, it has a diagram which is not rocket science. If your dimmer switch is basic and does not have a built in led you probably wont need to worry about connecting anything to the white wires, just make sure you ground the switch.
Also you are only going to want to put one dimmer switch in, if you put wo dimmer switches together your light wont turn on. So find out which switch is your power in on the common and put it there. You may be able to put the dimmer on the power out common if that is a more desired location but i dont know if that works I have always been told to do the other. You may have to break the metal tabs on the dimmer switch front to get it to fit in the box also.