so, certain musical equipment (keyboards/mixers/etc) have midi input and output.

like this

and my question is: is it possible to somehow connect this directly to a pc? Like through usb or the midi of the sound card? So I can use various midi soudfonts/effects etc.
Dear God, do you actually answer prayers?

Yes, but only in a way indistinguishable from random luck or the result of your own efforts.
There are several Midi to USB adapters that you can buy. Most of which are small boxes which have midi in/out cables at usually come with software to configure settings through. Those are the somewhat nice ones, anyway. Most of the nicer hubs, though, that I would recommend are ones that are USB audio hubs, which you can usually control through your own sound card's configuration, and force it through. That usually can be a bit nicer, depending on your setup.