Here is a great link courteous of Jeff Holden that explains the offside rule. You can also access the link from the "Links" page on the top menu bar.