You usually just have to complete the mini-game by making them cum by the techniques shown on the screen. Once all that is used up it will end if you don't get spotted. You can also end the lesson if you have the Octopus Sensei item which you can get from the market. It will be there during the touching mini-game and if you interact with the item, it'll ask you if you want to finish the session automatically and it'll skip the mini-game for you.