How do I get the tenancy contract with my current situation?

the person whom I pay the rent is not the actual owner. he is staying in the same apartment but partitioned seprately. So, can a tenancy contract be made between him and me. Also, what would be the procedure and whom would get it done.