public ActionResult Welcome(string name, int numTimes = 1)
This function signature indicates that an "action" method is returning some result (as you can see the return type ActionResult). This is an abstract class telling ASP.NET MVC how to write that result to the Response. You should explore the different types of action results:
http://msdn.microsoft.com/en-us/library/system.web.mvc.actionresult(v=vs.118).aspx
These different kinds of action results are the subclasses of ActionResult like HttpStatusCodeResult, JsonResult or RedirectResult. If you return View(), you just return an object that tells ASP.NET MVC that it should render the cshtml page, if you return HttpNotFound(); for example, the browser will get 404. You can try several kinds of return values by returning method results of System.Web.Mvc.Controller, for example:
return View("OtherViewName"); // If you have an OtherViewName.cshtml file
return RedirectToAction("OtherAction"); // If you have an action called OtherAction
return HttpNotFound();
return new HttpStatusCodeResult(500);
// if you are familiar with JSON:
return Json(1, JsonRequestBehavior.AllowGet);
return Json(new int[2] {1, 2}, JsonRequestBehavior.AllowGet);
return Json(new {A="A", B=123}, JsonRequestBehavior.AllowGet);
Or if you are looking for a more detailed explanation check this page:
http://msdn.microsoft.com/en-us/library/dd410269(v=vs.100).aspx
These are simply helper functions that will fill the response of the request. Without them, you would have to write Response.OutputStream the content that is parsed from a cshtml file, and filled with the ViewBag's properties, and you even would have to set the http headers like Response.ContentType and Response.AddHeader("Content-Length", 123213);.