In League of Legends, Liandry's Anguish only triggers for ability damage. On-hit damage will not trigger the effect.
Liandry's is a good item to build when the enemy is very tanky or when you primarily deal damage over time. It is not usually a good item for burst mages unless they also poke a lot.