They are indeed compiled at runtime. You can find a generated code file and temporary DLLs in the same place that compiled web forms are placed:
C:\Windows\Microsoft.NET\Framework64\<version>\Temporary ASP.NET Files\<app>\
You can also can enable compilation along with the rest of the project to detect errors in your views. See: Can Razor views be compiled?. This will increase the compilation time of the solution (in my experience), but it's great for detecting errors that would go unnoticed until runtime. I switch it on when needed.
The Razor parser/generator code is contained in the System.Web.Razor project/assembly (available as part of the MVC source). Since the end result is a c# class, the c# compiler presumably handles it from there as it would any other class.
The generated code for a view looks something like (excerpted from a "reset password" page in one of my projects).
namespace ASP {
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Helpers;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
public class _Page_Areas_Anonymous_Views_Home_ResetPassword_cshtml : System.Web.Mvc.WebViewPage<Web.UI.Areas.Anonymous.ResetPasswordViewModel> {
#line hidden
public _Page_Areas_Anonymous_Views_Home_ResetPassword_cshtml() {
}
protected ASP.global_asax ApplicationInstance {
get {
return ((ASP.global_asax)(Context.ApplicationInstance));
}
}
public override void Execute() {
const string title = "Reset Password";
ViewBag.Title = title;
BeginContext("~/Areas/Anonymous/Views/Home/ResetPassword.cshtml", 302, 63, true);
WriteLiteral("</h1>\r\n </div>\r\n </div>\r\n </div>\r\n <div");
EndContext("~/Areas/Anonymous/Views/Home/ResetPassword.cshtml", 302, 63, true);
BeginContext("~/Areas/Anonymous/Views/Home/ResetPassword.cshtml", 365, 12, true);
WriteLiteral(" class=\"two\"");
EndContext("~/Areas/Anonymous/Views/Home/ResetPassword.cshtml", 365, 12, true);
BeginContext("~/Areas/Anonymous/Views/Home/ResetPassword.cshtml", 377, 15, true);
WriteLiteral(">\r\n <div");
EndContext("~/Areas/Anonymous/Views/Home/ResetPassword.cshtml", 377, 15, true);
BeginContext("~/Areas/Anonymous/Views/Home/ResetPassword.cshtml", 392, 19, true);
WriteLiteral(" class=\"banner-box\"");
EndContext("~/Areas/Anonymous/Views/Home/ResetPassword.cshtml", 392, 19, true);
BeginContext("~/Areas/Anonymous/Views/Home/ResetPassword.cshtml", 411, 5, true);
WriteLiteral(">\r\n\r\n");
#line default
#line hidden
using( @Html.BeginForm( "ResetPassword", "Home", FormMethod.Post, new { id = "main-form" } ) )
{
Write(Html.ValidationSummary());
// etc. etc. Even simple views result in a large code file