Changing out an old light switch
Assuming the rocker on this switch doesn't say ON and OFF, this is most likely the middle switch in a "4-way" arrangement.  This is when three or more switches control a light.  The switches on the "end" of this setup will be the three-way switches you are used to.  The one(s) in the middle will be 4 way switches with 4 screws.  Rather than connecting travelers to a common screw like a 3-way, they flip the connections of the two travelers, so there are two travelers in and two out.

You might say that there are only two switches controlling the light, and in that case one of the three ways on the end could have been removed over the years.  You could try and diagnose that and figure out what all the wires do, but the simplest thing would be to get a new 4-way switch and use that.