A 3 way switch has three terminals and controls lighting from two locations. However, the four-way switch has four terminals and controls the room lights from two or three spots.
While this guide gives you an overview of how 3 way dimmer switch wiring works, do keep in mind that circuits sometimes vary. You might open the wall socket and find unfamiliar wires, or the dimmer might not work as expected. If that happens, call in a professional electrician to deal with the installation. Since you’re dealing with hazardous electrical wiring, exercising extreme caution is advised.