See
How to use ArcGIS samples
for help on compiling, setting up the debugger, and running the sample.
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders.
However, you will need to update the sample to point to the location of the data once you have extracted all the files.
Start Visual Studio and open the applicable solution file.
Build the project and start ArcMap.
Click the Customize menu and click Customize Mode.
Click the Commands tab and click Developer Samples.
Click the applicable tool and drag it onto an active toolbar in ArcMap.
Click the tool to enable it.
Click and drag an area to zoom in. Right-click to go back to the previous extent.