please help me understanding this wiring
You have two black wires that are effectively tied together through the lower screw and the push in connection on the back. It is likely that one is the hot feed to the switch and the other is an unswitched hot connection to some other circuit downstream, such as another switch, or an outlet.

The red wire is probably the switched hot going to the load.

If one of the black wires is hot to another circuit, there should also be white wires in the box connected to each other, probably at least 3 wires. One would come from the main panel, one to the load and one to the other circuit that shares the hot lead on the switch. There also may be more wires in the box unrelated to this circuit.