Compulsory education is an area addressed state by state in the United States, not a matter of federal law, and I am aware of no federal statute that provides for this. It's possible that there are incentives and/or disincentives on attendance built into the No Child Left Behind statute. But if you look at Article I of the Constitution, you will see that education is not an area for which Congress is meant to be responsible. There are countries that have compulsory education laws at the national level, for example, the United Kingdom, Russia, and France. But because of the nature of our Constitution, this is supposed to be a matter left to the states. Each state does in fact have a compulsory education law, but the ages for compulsory education vary from state to state.
Interestingly, there is no compulsory public education in any state in the United States. Oregon tried to compel this, but its statute was struck down by the United States Supreme Court, which held that while compulsory education was fine, states could not force parents to send their children to public schools. I have included a link to an article discussing the case.
Congress never passed this as a law. These kinds of issues are mandated by the state (just like your driver's liscences and that kind of thing!). It's something that the federal government did not feel warranted an oversight -- and I'm sure your history teacher has taught you all about states vs. federal rights (since that's largely the source of most American conflict)!