If you want to customize a list new\edit\display form there is a couple of ways you can do it. I mean programming ways (not InfoPath). All this methods related to creating custom rendering templates. Every list form has its own rendering template, for list its a "ListForm", for document library "DocumentLibraryForm". All this templates (and otheres) listed in DefaultTemplates.ascx file. Additional reading about how to create custom rendering template you can find here and here.
1. Content Type. If content types enabled for list, when you are createing new item, you can select what content to use and you can override default rendering template for this particular content type.
How to do it:
If you are using custom content type, you can specify rendering template in schema:
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<Display>YourCustomTemplateName</Display>
<Edit>YourCustomTemplateName</Edit>
<New>YourCustomTemplateName</New>
</FormTemplates>
</XmlDocument>
</XmlDocuments>
.......
</ContentType>
If you want to do it programmatically:
var list = web.Lists["MyList"];
var cp = list.ContentTypes["MyCP"];
cp.EditFormTemplateName = "YourCustomTemplateName";
cp.Update();
2. Custom list schema. In list schema there is a section named Forms, for every form you can specify custom rendering template name:
<Forms>
<Form Type="DisplayForm" Url="DispForm.aspx" Template="CustomSurveyListForm" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" Url="EditForm.aspx" Template="SurveyForm" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="NewForm.aspx" Template="MyNewSurveyForm" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
</Forms>
3. Existing (may be out-of-the box) list. I don't know the right way how to do it (except InfoPath of course). Object model for list has property named Forms, and you can get instance of specific form using code list.Forms[PAGETYPE.PAGE_EDITFORM] but SPForm.TemplateName has no setter... The only way that I can suggest - copy definition for oob list, customize forms section and then create list using xml ListInstance element and CustomSchema attribute.
Hope this helps.