The IIS virtual web of a SharePoint site is off limits :-)
Anyway pages are picked up by a module that redirects all parsing of pages (simplified).
Depending on versions you have different options.
For SharePoint 2007 we had Site Pages that could be provisioned using the
<Module> element, or you could create Application Pages.
Site Pages lives in the root of a given site and can have code behind. A typical use is a page that should only be visible for a given site.
Application Pages lives in a virtual directory, _LAYOUTS and can be accessed farm wide. A typical use is some application that should be made available from all parts of a farm.
Se here how to create an application page for MOSS / WSS3
Here is a primer on how to use code behind in ASP.NET pages in SharePoint 2007
In SharePoint 2010 the story is somewhat the same, except Site Pages have been moved from the root of a site to the SitePages library.
A description of the two types of pages can be found here on MSDN.