Classes have been cancelled at public schools as teachers in two states go on strike in a battle for improved pay and conditions.