The first step whenever working with electricity is to always turn the power off. With a three-way switch scenario, you can't rely on just turning the switch off, you have to turn the breaker off.
Since the four-way switch gets installed between the two three-way switches, locate the "traveler" wire that bridges the two switches together.
Cut the traveler wire in half. If you can't route the existing traveler wire into the new switch box, you will have to install a junction box where you can make your connections and feed two lengths of three-conductor wire to the 4-way switch installation site.
Look at the four-way switch and note that it has five terminals on it: two black, two brass and one green.
Connect the two white wires together and secure them with a wire nut. Then, twist the two bare copper wires together, leaving one longer than the other, so it can be connected to the green ground screw on the switch. Or you can wirenut the two grounds together with a third piece of ground serving as the pigtail.
Take the black and red wires from one of the cables and connect them to the two black screws, one on each side of the switch. It doesn't matter which color gets installed to which side.
*Important: Do not connect the black and red from one cable on the same side of the switch; it will not work.
Take the black and red from the other cable and connect them to the two brass screws. Again, it doesn't matter which color gets installed to which side, as long as they are not installed on the same side.
Wrap the terminals with electrical tape and assemble the switch to the box and install the switch plate.
Turn the power back on and begin flipping your two three-ways and your newly-installed four-way switch to test your lighting circuit.