It is very hard to set out guidelines that do not appear to be too rigid or to stigmatise some behaviour that may be perfectly innocent. At the same time, this is a question which lies at the very heart of professionalism. Most people recognise inappropriate conduct when they see it.
The relationship between teacher and student, or pupil, is not a relationship between equals. The one has power, authority, even control, over the other. Any abuse of that situation, for whatever motive, is unprofessional.
Emotional involvement is the most common problem. Between adults, it is inappropriate and should lead to a separation of the personal from the professional relationship. When minors are involved, it is totally unacceptable. The responsibility rests entirely with the teacher to ensure that it does not happen.
Because teachers and students work closely together and because the latter often admire the former as role models, there is always the risk that emotional attachments may develop. The best advice for teachers is to take care never to place themselves in a position where an emotional attachment might be expressed or in a situation where other people believe that it might be.
Where students show signs that their feelings are too personal, teachers must make it abundantly clear by their response that the behaviour is inappropriate. Young male teachers can be vulnerable in this respect. Where the behaviour persists, they might well consult seek the assistance of a senior female colleague.