One of the ways in which Lady Macduff acts as a foil to Lady Macbeth is that she appears as a loving parent; she is shown talking with her little son in a a kind and caring manner. This underlines her maternal qualities which are in direct contrast to Lady Macbeth who has no children and claims that she would be ready to sacrifice them to her ambitions even if she did. The two women are alike in that they both show impatience with their husbands, although they want very different things from them; Lady Macduff wants her husband to think more of his family while Lady Macbeth only wants Macbeth to be king. Finally, it may be said that Lady Macduff acts as a foil to Lady Macbeth in the sense that her husband eventually triumphs in battle over Lady Macbeth's.
One way in which Lady Macduff can be seen as a foil for Lady Macbeth has to do with their gender. During Shakespeare's time, gender roles were quite rigid and clearly defined: men were to be the protectors of their homes and families, the breadwinners and providers for those families, brave and strong. Wives were to be ruled by their husbands, their behavior to be appropriately "feminine" and submissive. Lady Macbeth is, clearly, not like this at all: she -- at least initially -- seems braver than her husband, and she is certainly not submissive to him; she takes the lead in planning Duncan's murder and has to help him keep it together after he does the deed. Lady Macduff, on the other hand, is very maternal—a "feminine" and therefore expected quality—and she expects her husband to protect her and her family. When he does not, leaving them vulnerable to the tyrant Macbeth, she blames him and schools herself and her children to think of him as dead (as she believes it would be better for him to be rather than to be a coward).
Further, both women die, indirectly, as a result of their husbands' abandonment of them. When Macduff goes to England to find Malcolm, he leaves his family without any protection. Macbeth seizes this opportunity to punish him by murdering his entire family, wiping out his entire line. Macduff doesn't kill his family, but his lack of foresight makes possible their murders. Likewise, Lady Macbeth seems to become desperate after the murder of Banquo and the Macduffs; her guilt begins to consume her, and she eventually takes her own life, perhaps as a result of her terribly burdened conscience and consequent misery. Her husband no longer consults her when making decisions, and he descends deeper and deeper into evil. Neither Macbeth is happy; in fact, they both lament how sad it is to have what they thought they wanted, only to find that they cannot feel content. Macbeth figuratively abandons his wife to her guilt and illness, just as Macduff literally left his wife alone; both, left alone to fend for themselves, die pitiably.