So how does the defenders win? Is there a timer that the attackers have to complete the mission by?
Yes. Each major objective has a time limit attached to it. If the attacking team cannot complete the objective within the allotted time they lose. If you are playing the campaign, then the winners will move on to the next mission in their campaign, and the losers will retry the current mission against different opponents. In free play, it most likely works like your standard multiplayer. One team wins, one team loses. New, random map. Players get scrambled.
Don't quote me on that though.