The best way to remove an old owner’s Apple ID is to perform a factory reset. It is possible to remove the Apple ID from individual applications, but you will likely still keep encountering it. Similarly, it is possible to create a new administrator account with your Apple ID, but a factory reset is the only guaranteed way to remove everything.