<p>How does sharepoint identify a file type? For example, SharePoint will not allow you to upload executable files. Suppose if i rename a file extension from .exe to say, .doc, will the sharepoint allow the upload of this file? </p>

I believe there are two ways to identify file types. A naive approach is to check the extension. A more secure approach would be to examine the bits of the file and see what type the file is as many file types have a few bits (
magic numbers
) in the header that identify the format.
Depending on how SharePoint checks the file, that will determine how you can cheat the system.