The magnetic structures and transitions of a potential multiferroic orthoferrite ErFeO3