I have been doing some quite a bit of mentoring to new SharePoint developers lately and was asked the question of what the difference was between a .dwp and .webpart file and which one should be used. Yes, I know this is an intro topic but if you are new to SharePoint you aren't going to know this. As you may know, they are both files used for describing where the code is for a web part. The difference is .dwp was the file extension used in version 2 of SharePoint and .webpart is a new extension used in version 3. Inside the files, the schemas are different and it is indicated as such by the version number on the xmlns attribute.
Here is an example of a version 2 schema.
<Assembly>Microsoft.SharePoint.Portal, Version=220.127.116.11, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
<Description>Used to search document and items.</Description>
Version 3 is a little different.
<type name="Microsoft.SharePoint.Portal.WebControls.BusinessDataListWebPart, Microsoft.SharePoint.Portal,Version=18.104.22.168,Culture=neutral,PublicKeyToken=71e9bce111e9429c" />
<importErrorMessage>Cannot import this web part.</importErrorMessage>
<property name="Title" type="string">Business Data List</property>
<property name="Description" type="string">Display a list of items from a data source in the Business Data Catalog.</property>
<property name="CatalogIconImageUrl" type="string">/_layouts/images/bizdatawebpart.gif</property>
<property name="CacheXslStorage" type="bool">true</property>
<property name="CacheXslTimeOut" type="int">600</property>
The main difference is that all properties passed to the web part are specified with a property element and a name attribute in version 3. Version 2 uses different element names for everything.
Which file extension should you be using? Probably .webpart since it is version 3. However, there is really nothing wrong with using version 2 although maybe it will be removed from a future version of SharePoint. If you take a look at the web part gallery, you will see plenty of web parts still using .dwp. So for now, I recommend version .webpart, but if you are more familiar with the syntax of version .dwp, have at it.