The guidance for England was published on Friday evening, just days before many schools begin term.
The NAHT school leaders' union said the timing was "reprehensible".
In local lockdowns, secondary pupils could be kept home every other fortnight and, in an outbreak, large groups could be told to self-isolate.
Paul Whiteman, general secretary of the NAHT, said the decision to publish the guidance on a Friday evening before a bank holiday was "nothing short of reprehensible and demonstrates a complete lack of regard for the well-being of school leaders and their teams".
He said: "It was obvious weeks ago that lockdown advice was necessary."
In areas where additional coronavirus restrictions have been introduced because of rising cases, secondary schools have been told they might have to limit the number of students and bring in a rota system, with each pupil spending a fortnight at school then a fortnight learning remotely so as to break the chain of Covid-19 transmission.
The guidance says this would only happen after "all other measures have been exhausted" - but that if cases continued to increase, all students might have to move to remote learning apart from those in vulnerable groups or whose parents were key workers.
Education Secretary Gavin Williamson said the document was a contingency plan for a "worst-case scenario", which he hoped would not need to be implemented.
There are four stages of response, depending on the level of virus cases in the area:
Tier 1: All pupils attend as normal.
Tier 2: Secondary schools and colleges move to rotas, with students alternating a fortnight attending and a fortnight at home. Primary schools remain open to all.
Tier 3: Most secondary pupils learn from home as secondary schools and colleges are only open to vulnerable children, the children of key workers and selected year groups.
Tier 4: All schools switch to remote learning, except for vulnerable children and the children of key workers, and students at alternative provision and special schools.
The guidance also sets out what to do when a school confirms a case of coronavirus. Health protection teams will advise the school how many pupils need to be sent home to isolate for 14 days.
If a case occurs where the "bubbles" used to limit pupils' contacts in schools are smaller, such as a single class, all those in the bubble might have to be sent home to isolate.
In bigger bubbles, such as an entire year group, health protection teams could send home all the other pupils, or limit self-isolation to those who were in direct contact or close proximity or who had travelled with a pupil with the virus.
Patrick Roach, of teachers' union NASUWT, said the government needed to give schools the resources to cope with the potential disruption, including support for remote learning and cover for staff absence due to self-isolation.
"The availability of staff where there is a local lockdown or outbreak may mean that schools have to limit provision if they cannot be staffed safely," he added.
Geoff Barton, leader of the ASCL head teachers' union, said he felt a "weary, resigned sense of inevitability" to receive the guidance at the last minute, after head teachers had been accused of "treachery" for asking for contingency planning for outbreaks.
He said more needed to be done to support students in exam years who might find their teaching disrupted, including ensuring they had access to laptops to study at home.
"We have to do better than previously," he said. "We simply cannot have those young people being left at home without clear guidance on what they're going to do."
Mary Bousted, joint general-secretary of the National Education Union, said the guidance should have been ready "months ago".
Labour's shadow education secretary Kate Green told Sky News the guidelines were "long overdue" and it was "unfair" to school and college leaders to release them so close to the start of term.
The guidelines on introducing rotas only apply to secondary schools. Prof Neil Ferguson, a former advisor to the government on the pandemic, told BBC Radio 4's Today programme primary schools often only had "the odd case" without evidence of wider transmission, so there was less need for the measures.
But he said schools also needed "very rapid testing" of students and staff to control outbreaks.
Prof Carl Heneghan, a Oxford University epidemiologist and practising GP, said cold and flu cases meant many pupils would have to self-isolate until they could be tested, so schools and families faced "significant disruption".
"If your child has any symptoms they're going to have to stay off school. In the past there's been a tendency to say, you can have some Calpol, maybe you can go in. But there's going to have to be a sea-change in how parents behave with their children," he said.
By Dan Johnson, BBC News
Head teachers had asked for a Plan B and here it is - but there's frustration it came just days before more children are due back in the classroom across England.
A suggestion of entire year groups or classes - "bubbles" - having to automatically self-isolate was deleted, but not before it added confusion.
The Department for Education is now pointing to more nuanced guidance about head teachers and public health officials needing to establish who's been in "close contact" with anyone who tests positive.
There's recognition that schools won't be immune from outbreaks in local communities and, while the intention will be to stay open and keep children in class, there's an acknowledgement that further interruptions to learning are possible.
Primary school pupils are the clear priority. Secondary schools will first adopt a rota system before more prolonged disruption, meaning remote learning will still be a reality for some children.
Meanwhile, Health Secretary Matt Hancock has not ruled out nationwide restrictions should England see a spike in coronavirus cases this winter.
He told The Times a second wave was "a very serious threat" and that, under a "reasonable worst-case scenario", Britain could be faced with a spike in Covid-19 cases and a bad outbreak of seasonal flu as people spent more time indoors.
In other developments:
* A leaked government report suggests a "reasonable worst-case scenario" for the UK this winter is 85,000 deaths due to Covid-19, with more restrictions reintroduced but schools remaining open
* There have been a further 1,108 confirmed cases of coronavirus across the UK in the past 24 hours. Another 12 people have died within 28 days of a positive test, bringing the UK death toll to 41,498
* Hundreds of people in Trafalgar Square demonstrated against the UK government's coronavirus measures, holding banners with slogans such as "Covid hoax"; similar protests have taken place in Berlin and Paris
* Quarantine requirements for travellers returning from Switzerland, Jamaica and the Czech Republic began at 04:00 BST on Saturday
* Premier League football fans have had their first taste of watching a live game for six months, with a restricted number of Brighton supporters allowed at the Amex Stadium for a friendly against Chelsea, as part of a government trial
* And French President Emmanuel Macron has warned of the possibility of a nationwide lockdown after a spike of 7,379 cases on Friday
When you see corruption being rewarded and honesty becoming a self-sacrifice, you may know that your society is doomed