There may come a time when you need to run some code on a site regardless of who's logged in at the time. Before, you would have to impersonate an account that has the privileges needed to execute the specific line(s) of code. Now, there are 2 ways that you can run the code without having to do an impersonaation.
Method#1
Create an SPSecurity.CodeToRunElevated object. When instantiating this object, it expects you to pass a method name as a parameter. Follow this line of code with an SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated object).
In the image below, you'll see that I create a CodeToRunElevated object called elevatedCreateWeb and I'm passing in the name of my method that needs elevated privileges (CreateWeb). The next line is passed the object that I just created.
This method is the cleanest (easiest to read) way to do this.
Method#2
This method is a little more difficult to read but still simple. Instead of creating the 2 lines as in the example above, you'll just need to create the second line. Now, since you don't have a CodeToRunElevated object, you need to pass in delegate() { full code here }.

When you add your code, it will look something like this next image.
If you've taken a real good look at the last bit of code, you'll notice 2 using statements that are used to create an SPSite and SPWeb object. You'll also notice that when I instantiate them, I'm using other SPSite and SPWeb objects. I'm doing this because you can't use an SPContext inside the code being run with elevated privileges. If instead I write SPWeb site = SPContext.Current.Web, inside my using statement, you may see an Access is Denied error because your web was created in the context of the current user.