There was a station (which I don't remember) I had to leave the subway and buy a different ticket to transfer. Some stations have multiple platforms stacked next to each other that it is easy to transfer even if the lines are managed by different railway companies, but that is not the case all the time. That's how I learned that there are multiple railway companies in Tokyo that are not cooperating with each other enough to make the transfer seamless. Once you make a few mistakes, it gets easier, but it is not so friendly to foreigners. Also stations like Shinjuku is so huge that it is very complicated figure out where your exit is. Then again, once you get used to it, it becomes easy.