I would like to work with a professor in my field as a postdoc after I complete my PhD in Computer Science later this year, who has a remarkable record of supervising PhD students to become faculty at research universities. If I get hired, is he going to oversee me to pursue my most interested project, which is in a different subfield from what he is working on currently, or to carry out his projects? If the former, Why would he hire me as a postdoc then? Just train me to be an independent research even though it may not advance his projects directly?
This is one of those questions that simply cannot be answered in generality. Sometimes, one hires a postdoc to do exactly this one thing that needs to be done. In that case, it will be rather difficult to spend too much time on your own projects. In other cases, one hires a postdoc simply because the funding is there, without a very specific research goal in mind. In these cases, working mostly on your own things may be fine with the professor.
I advise you to clarify with your potential employer. (however, be prepared that he or she might upsell the actual level of individual research that you will be able to do - maybe it is a good idea to also chat with other postdocs in the same group)
If the former, Why would he hire me as a postdoc then? Just train me to be an independent research even though it may not advance his projects directly?
There is actually good reasons to hire postdocs that are not exactly in your field. They open up new research directions for your lab. They allow you to publish papers that you couldn't have written on your own. They strengthen the teaching portfolio of your lab, at least if postdocs routinely teach. All in all, your lab then has expertise in an area that it did not have expertise in before.
I, for instance, traditionally work on topic A. Recently I moved to a research group that is very strong in the quite different topic B. The motivation of the lab head there was simple - he participated in a project on the intersection of A and B. He knows how to do B, he needed somebody that knows how to do A. Our (informal) deal is that I am to spend some amount of time (less than 50%, realistically) on the joint project, the rest of the time I am to teach and develop my own research agenda within our lab - which conveniently is also in the intersection of A and B, although a somewhat different direction than the joint project. I think that this setup is actually quite beneficial, both to our lab and me personally.
Edit: a word of caution, though - I have also seen professors who are not in favor of independent research within their lab at all. So don't assume that because it seems to work for me, it definitely will work for you as well. People differ.