Interesting question! Not easy to answer. But I prefer the research - it is so hard to work with students. On the other hand my main job is education, so I do my best to teach the young people.
To motivate students and helping them develop research skills is also satisfactory. Sometimes your students become your collaborators, and then you can mix teaching with research.
Both of them. I am a education research and, just to keep my professional consistency, I always defend that research and teaching are inseparable. Furthermore, for the university professor, teaching is also research space.
My primary job is teaching. I don't belong to a university and have no papers published, and yet, I agree with Devang. Research is critical to teaching, even if that research is ad-hoc and amateurish. I also agree with Dina and Sik, researching is cold without the teaching to test the ideas against other minds. As Zahari said 'it is so hard to work with students' and yet, they motivate, inspire and test one's ideas.
As state by others, teaching in higher education and conducting research are interconnected in science. For me teaching breaks down into two categories - educating in the classroom and educating through mentorship. One can have a profound impact on others through classroom teaching and in mentoring, but they are different types of impacts. I personally enjoy mentoring students in research, helping them form the way they think about and conduct science. I consider the classroom as a place to provide students with fundamental knowledge and to motivate their interest in a field, while mentoring is an opportunity to provide them life skills and a passion for generating new knowledge.
A difficult dilemma to solve. I believe both are complement. In many cases the sessions with the students would be better if the professor have done research in the items that he/she teachs. Research should show its results, and the class sessions are a stage for that. However, if the question point out what is my main personal inclination, I would prefer researching.