You can use female machined pin header (soldered into prototyping board, for example) to plug IC's in DIP packages into (tip: insert the IC into the pins before you solder them, otherwise they might not be soldered in perfectly straight, so the spacing wouldn't quite match that of the pins).
Likewise, you can plug female pin header into sockets designed for a DIP - for example, you might replace an IC with a piece of prototyping board to replace the IC with a circuit of your own design (for example, to replace an IC that was no longer available with an equivilent circuit, or because you realized there was some problem with the IC you originally chose) - you can even use IC sockets + machined pin header as a board to board connector in this way.
You can use either type of pin header for connections between boards - note that the height of the connectors with machined pin header is significantly shorter, which may be an advantage.
You can use male square pin header to connect to female dupont jumpers. You can use female square pin header for male dupont jumpers, but this seems to make a less reliable connection; I can only recommend male dupont pins for plugging into female dupont pins or breadboard, or where you have no choice (ex, on an uno where all they give you is female pin header).
You can use either type of male pin header to plug something into breadboard, but machined pin header is much preferred here, as the larger square pins deform the clips in the breadboard, causing future connections made with other types of connectors to be less reliable.
DryRun:
Interesting... So, could i use this motor driver IC with these machine pins by just clipping it onto it, and not have to solder instead of using the female pins as shown in the picture below? It's strange that i haven't encountered this before... it doesn't seem to be popular in DIY Arduino kits or robotics tutorials...

That is not an IC, that is a circuit board with an IC (in the TSSOP-24 surface mount package) and several supporting components mounted on it; often called a "breakout board" or (particularly if the board were more complicated than just one IC with each pin broken out to header) a "module"
You must solder some type of pin to it (or wires, I guess) - point is, solder must be involved.