What did Iago do to cause Cassio to lose his job?
In Act 2, Scene 3, Iago plans to get Cassio drunk and quarrelsome in order to disgrace him before Othello and the whole town.
If I can fasten but one cup upon him
With that which he hath drunk tonight already,
He'll be as full of quarrel and offense
As my young mistress' dog.
Iago is a shrewd judge of men and uses their weaknesses to his own advantage. He knows that Cassio has a low tolerance for alcohol.
Sure enough, Cassio gets into a sword fight with Montano, and Iago sends his dupe Roderigo off to cry "Mutiny!" Othello appears on the scene and is outraged that his lieutenant should be behaving in such a manner while on duty and while they are in a state of emergency. He tells him:
Cassio, I love thee,
But never more be officer of mine.
Iago thus becomes second in command by default. This incident is of great importance in the plot, because Cassio begins seeking Desdemona's help in getting back into Othello's favor at a time when Othello is becoming jealous and suspicous of the relationship between the handsome Cassio and his beautiful wife. Desdemona is only hurting herself when she pleads with her husband to reinstate Cassio. It looks as if she has more than a friendly interest in Cassio. Iago manages to work his mischief without being suspected of being responsible.