There are three simple steps on your way to get a pet.
Find a mob that is tameable is the easiest step. All tamable mobtypes can be found here (This may vary for your server as each type can be enabled/disabled with permissions).
This can be the hardest part but how hard it really will depends on the configuration of the Server.
Every pet-Type has a setting called LeashFlags that sets the requirements needed for the pet-Type to become a pet.
When Step 1 & 2 are done you just have to hit you target with the LeashItem (String by default).
After hiting your target it will convert from a normal mob into a pet and you will see a message like this:
You took a pet on a lead, it will be a good pet.