That depends on the hen.
If you don't do anything, some give up in less than 3 weeks, some keep it up for 6 weeks or longer.
Putting her in a wire broody-breaker cage (like in that article that someone just linked) works for many people.
Sometimes just moving the hen to a different place will make her quit being broody. (People usually discover that when they buy a broody hen and bring her home, or when they move a broody hen to another pen because they want her to hatch eggs in the new pen. Sometimes that works as planned, but sometimes the hen quits being broody and the person gets frustrated.)