The worst thing possible. You sold them your iPad with your account still active on it. Then you gave them your password, which they have now changed, locking you out of your own account.
What you have now is a mess, especially if the new owners are nowhere close by.
If they are, get the password from them, if you can. Then go back in and remove the iPad you sold from your account. Change the password again and change the two factor ID answers so only you can get back in.
Login to the iPad you sold so you can properly erase it (see Bob's link). When done, it should start up to the "Hello" screen as if it just came out of the box. From there, the new owners set up their own Apple ID and password for the device.