1- get the source,
2- read the source,
3- find the bug list (trac, github issues, launchpad, whatever the project uses),
4- search for an open bug that seems easy to correct,
5- correct the bug,
6- request a merge, or send a patch,
7- listen to comments and reviews about your patches,
8- repeat a certain number of times,
9- eventually ask for write permissions on the project repo,
10- continue correcting bugs and adding features,
11- write some documentation,
12- help newbies.