See Using the samples for help on compiling, setting up the debugger, and running the sample (either an exe or dll).
Open and compile the solution.
Start ArcMap and either open a map document with a layer or add a layer to a new map document.
Add the ZoomToLayer command to a toolbar. It will be in the Developer Samples category, with the name of: Zoom To Layer C# (C# version) or Zoom To Layer VB.NET (VB.NET version).
Select a layer in the table of contents (TOC).
Click the ZoomToLayer command button to zoom to the extent of the layer selected in the TOC.