Creating plugins is not very difficult. However it would take you a couple of hours to a day to get it right and make your first plugging working depending on your level of experience.
I suggest reading the documentation of your server (Whichever server you are using - openfire is stable and popular).
They have their own documentation to create a plugin. You can start with cloning an existing plugin and renaming it to your own plugging and doing something simple like printing a line.
You can then go to read the documentation of openfire to implement a IQ packet router to intercept your custom IQ request.
I suggest you take it slow and start with reading the documentation. It isn't as complex as it looks initially.