Can someone tell me what/how there are 4 wires on one switch and if they're necessary?
You need a 3-way version of the switch you have

Take the new switch you got back to where you got it and ask them for the 3-way version of it, as your existing switch is quite clearly a 3-way switch.  Once you have a 3-way switch in your hands, there will be 4 terminal screws on it: 1 green ground screw, 2 screws with the same color (often brass), and 1 differently colored (usually black) screw.

The red wire in your photo above went to the differently colored (black) screw on the old switch, so it goes to the differently colored non-ground screw on the new switch, while the top black wire in your photo goes to one of the same-colored non-ground screws on the new switch.  The two remaining black wires get nutted to each other and to a black pigtail going off to the remaining same-colored non-ground screw on the new switch, while any ground in the box should be connected (or pigtailed, if there is not a ground pigtail coming out already) to the green ground screw on the new switch.