refrerence
What is Webpart
By taking advantage of the Web Parts , you can build applications that can be easily customized by users at runtime. Users can rearrange the elements of a page built with Web Parts by using a drag-and-drop interface. Users can also add and remove elements in a page by working with one or more Web Part catalogs.
There are two basic ways to create a Web Part:
1- You can treat any standard Microsoft ASP.NET control as a Web Part
2-or you can build a custom control that derives from the base WebPart class.
You are not required to modify a control in any way to use it as a Web Part. Standard ASP.NET controls (such as the Calendar and GridView controls), Web User Controls, and even custom controls can all be used as Web Parts. When you treat a standard control as a Web part, the control is represented in the Web Part framework with the GenericWebPart class.
Alternatively, you can build a custom Web Part control by building a new control that derives from the base WebPart class. The advantage of this second method of creating a Web Part is that it provides you with additional options for customizing the appearance and behavior of the Web Part. In this article, since we'll tackle some advanced features of Web Parts, we'll build all of our Web Parts by creating custom Web Part controls.
How To
Every page that contains Web Parts must include :
1 - one, and only one, WebPartManager control. This control must be placed before (above) any other Web Part control in a page. The WebPartManager control is responsible for tracking information about the state of all of the Web Parts in the page.
2 - In addition, any page which includes Web Parts must include one or more WebPartZone controls. These controls are used to mark the different areas of the page (Web Part Zones) to which Web Parts can be added. For example, you can drag-and-drop Web Parts between different Web Part Zones.
3 - Finally, and this is optional, a page containing Web Parts can contain a CatalogZone control. This control is used to display one or more catalogs of Web Parts that you can add to a page.
read more
other good resources : http://www.15seconds.com/issue/070301.htm