Schools in England are to get a real-terms increase in funding, the chancellor George Osborne has said.
The schools budget will rise from £35bn to £39bn for the next four years.
But England's universities face a 40% cut to their budgets and colleges a 25% cut.
There will be a 60% cut in capital spending and Educational Maintenance Allowances - paid to encourage 16-to-18 year-olds to stay in education - are being scrapped.
The teaching budget for England's universities will fall from £7.1bn to £4.2bn per year - a big reduction - but one which is lower than had been predicted by universities.
The cuts will fall largely on the humanities because the government had already promised to help fund science, technology and maths.
University research budgets are being frozen for the next four years.
Overall, the Department for Business, Innovation and Skills (BiS) is to be cut by 7.1%.
Further education is also facing heavy cuts.
BiS is reducing its overall budget for further education for over 18s by 25% over four years.
The increase in "school spending" announced by the chancellor amounts to a 0.1% yearly increase in real terms.
It includes the £2.5bn a year being pledged for the "pupil premium" - where money will follow disadvantaged children to schools.
But there will be 12% cut in the Department for Education's non-schools budget.
This includes areas such as youth services, early years and sixth forms as well as teenage pregnancies and drugs awareness.
Overall, the department will cut "resource spending" by 3% in real terms by 2014-15, although when all spending is considered, the total cut is 10%.
And the large cut expected in capital spending - largely through the scrapping of the Building Schools for the Future - has been confirmed.
There will be a 60% cut in real terms in capital spending over the four-year spending review period.
A total of £15.8bn is being set aside for capital spending for this time.
This will be enough to "meet demographic pressures and to address maintenance needs", the department says.
The government will rebuild or refurbish over 600 schools from the Building Schools for the Future and Academies programme, officials say.
The Sure Start scheme, which provides centres and services to families of young children, will continue.
It will be protected "in cash terms", Mr Osborne said, and will focus on "its original remit".
The Department for Education later confirmed that Sure Start would remain "universal", that is, available to all.
The Educational Maintenance Allowance - which can amount to £30 a week for poor 16-to-18-year-olds - is being scrapped.
It will be replaced with "targeted support for those who face genuine financial barriers to participation", the government says.
This is understood to mean that the new payment will be directed at the most needy among those who currently get the allowance - available to students from households earning up to £30,000.
The Education Secretary Michael Gove said: "The size of the deficit means we have had to make tough decisions.
"There will be many savings across the department but the coalition government is committed to improving education for all. That's why we're protecting the front line, handing power to teachers and introducing a pupil premium for the poorest."
Labour said the small print showed the government had "sold out children".
The party's education spokesman Andy Burnham said: "George Osborne's words are already unravelling. The much vaunted pupil premium turns out to be a complete con.
"It does not come from outside the schools budget as the Coalition Agreement promised - we find out today that it is to be recycled from within it, creating huge winners and losers among schools."
The government insists the money for the pupil premium came from outside the schools budget.
Councils in England are facing a 7.1% cut in funding each year of the review.
Money given directly to them for schools will continue to be ring-fenced, Mr Osborne said.
But the public sector union Unison accused the coalition of being dishonest in saying that the schools budget was being boosted.
General secretary Dave Prentis said: "Schools also get vital funding and support services from local authorities, which are being hit by drastic cuts.
"Many will struggle to afford to help schools support children with special needs, or run truancy units. Schools will have to dip into their own funds to pay for these essential services."
Education is devolved across the UK, but Mr Osborne said the funding mechanism for Scotland, Wales and Northern Ireland meant the "relative protection" of education would be passed on.
The chancellor also announced there would be "personalised budgets" for "special educational needs". Details were not given.
And he said there would be a big increase in apprenticeships - a rise of 50% on previous government's target.
This would create 75,000 new apprenticeships a year by the end of the review period, he said.
The general secretary of the Association of School and College Leaders Brian Lightman said: "We welcome the commitment to education in the chancellor's speech today and the priority that has been given to protecting education funding."
"The true impact on education won't be clear until more detail emerges over the coming weeks and months. Schools will be better off than many of the public services, but will need to make tough choices on spending.
"The financial outlook for post-16 is much more worrying."
Christine Blower, general secretary of the National Union of Teachers, said the cuts would have a "devastating impact on vital public services including education".
The chancellor' s speech had left many questions unanswered, she said.
"The government may talk about protecting schools, but schools are not protected and nor are local authorities," she said.
"Attacks are already being made on additional education funding outside of the core schools budget, with vital frontline services to schools already under threat.
"Teachers are faced with a pay freeze and cuts to pensions which mean they have to work longer for less."
Professor Steve Smith, President of Universities UK, said: "Today's cuts to the higher education budget cannot be good news for our economy or society.
"We are pleased that the government has listened to Universities UK's views on the importance of science and research to the growth of the economy, and that this is recognised in the protection of the research budget in cash terms. This is a vote of confidence in a vitally important area at this critical time.
"However, the freezing of funding for research will still pose challenges to our universities.
"Universities will continue to do all they can to minimise the impact of any cuts on the frontline services they deliver."
College principals said the latest cuts to the sector - 25% - (a reduction of £1.1bn) were "not as dire" as they had expected.
Assistant Chief Executive of the Association of Colleges, Julian Gravatt, said: "There is no escaping the fact that the next few years will be extremely difficult, but colleges are resilient and will find ways of making the best possible use of the funding available".
The cuts to further education include the axing of the "Train to Gain" programme, under which at least a million employees have received training to develop their workplace skills.
Adult learners aged over 25 who have never passed a GCSE or equivalent will no longer be able to study for these qualifications free of charge.
And students aged 24 and over studying for A-level equivalents will have to pay the full cost of their courses, rather than just half, as at present.
But subsidised loans will be available, and repayments will be means tested, "protecting those with lower earnings," the Treasury said.