Pipelines are defined in config. Sitecore's pipelines exist under:
<sitecore>
<configuration>
<pipelines>
Within a pipeline, handlers are processed in the order they are defined in config, the order and position of a handler is relevant.
Here is a list of available pipelines
The <httpRequest>
pipeline is perhaps one of the most common to modify. Several of the steps there build the context information (item, site, language etc) that are then available under Sitecore.Context
Usage of a pipeline involves inserting a handler at an appropriate point in the chain of handlers defined in config. A pipeline handler typically inherits a base class for that pipeline, overrides a method, and interacts with the pipeline args or other classes. In the case of the httprequest pipeline a processor would inherit from the abstract class HttpRequestProcessor and override the method public override void Process(HttpRequestArgs args)
For example if you wanted to store the original request url before any possible modification by the LanguageResolver pipeline step, you could add the following, which stores the url in the Context.Items[] dictionary. Within config this handler would be added before LanguageResolver.
public override void Process(HttpRequestArgs args)
{
args.Context.Items["OriginalRequestUrl"] = args.Context.Request.RawUrl;
return;
}
It is also possible to build your own entire pipeline using the same framework for your own purposes, this is well described by Anders Laub in this blog post.
You can also view active pipelines via the special admin page /sitecore/admin/pipelines.aspx