How to change the behaviour of a module i often need to change/add new behaviours to existing modules, but i don't really know what is the correct way to do this.

For example i have installed the webform module. What i need to add is this: 


on the list of submitted forms i need a button (create user) which creates a new user using some data of the submitted form.


What should i do?

Should i change the module code or is there a way i can inject this behavior by creating a new module?

I'd like the second option more than the first, are there some tutorials on how to do this?
Most of the time you will want to try to stay away from modifying the modules directly. This can be done, but it makes it more difficult to upgrade to future versions of the module. 

A lot of modules allow for modification, and Drupal itself is designed for you to be able to modify things at many stages in the process of building a page. So if you can inject functionality it is best to do so. 

This isn't always possible to do in which case you can either modify your local copy of the module. Or you can create an issue on the modules issue queue with a patch, which may get picked up in a future release of the module.

How to inject behavior is a very broad subject (I am sure specifics are already answered or can be asked on this site).

Most of the time you will want to create a module, and implement hooks which will allow you to modify things.