Few of Good Links for Creating Simple Web Part to complex web part in Sharepoint
Links for Creating Simple WebPart in Sharepoint
Good Example of Creating Webpart step by step
This link will explain how to create web part that will take input filter the result based on given input and display result. (It explains Provider, Consumer Scenario very nicely).