It is an exceptionally helpful item on physical damage dealers when fighting against champions with low magic resistance (ie - most ranged champions, which receive no MR per level, and will have the flat 30 MR without runes/items/masteries).
It's also highly useful on frequent auto-attackers against champions with high magic damage, since at max stacks it gives as much magic resist as items such as the Banshee's Veil while not sacrificing a slot purely for a defensive item. Bear in mind, though, that this will be less effective against burst casters who can execute their combos before you can achieve max stacks through auto attacks.
It's also a great item on tanks that rely on attackspeed or have on hit effects, as it greatly bolsters their magic resistance, and the time it takes to steal it, doesn't matter as much, due to them being tanky anyway. Tanks that work well with this include Volibear and Shen.
Wit's End is a strong counter to Thornmail, as it not only provides the user an on-hit effect with their auto-attacks that ignores Thornmail's passive, but it also provide magic resistance that reduces the incoming magic damage from Thornmail's passive. Wit's End also increases the user's magic resistance per auto-attack and reduces the enemy's magic resistance, thus allowing the user to deal more damage with Wit's End's on-hit passive than what Thornmail can reflect back.
Wit's End's stacks affect two things - increasing your MR and decreasing its target's. These stacks apply independent of individual targets - you can attack one target, then attack a different one, and still have +10 MR - but the MR decreasing only applies to one target at a time, which resets in stack amount whenever a new target is attacked. Runaan's Hurricane is an exception to this, in both primary and secondary targets - switching from target 1 to target 2 and back, as long as both are either directly or indirectly attacked, will continue to suffer MR reductions.
Wit's End's additional on hit damage does not affect structures.
Considering the item's name, the 42 magic damage on hit (and the previous 42% attack speed bonus) is probably is a reference to The Hitchhiker's Guide to the Galaxy where 42 is the number that signifies "The Answer to the Ultimate Question of Life, the Universe, and Everything".