Find a mob that is tameable is the easiest step. All mobtypes are tamable except Shulkers because they can't move.
Step 2 - Meeting the Requirements
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.
Step 3 - Taking mob on a lead
When Step 1 & 2 are done you just have to hit (attack) your target with the LeashItem (Lead by default). After hitting 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.
Using the Lead as a weapon is required to perform the actual act of taming.
Putting the mob on the lead/rope will do nothing towards taming your new pet.