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 solution file.
Edit the strings in the Input database and Mosaic Dataset region to specify the parameters that specify the database from which to open the mosaic dataset, and the name of the mosaic dataset to open. Alternatively, these parameters can also be specified as command line arguments.
Compile and run the program.
If the program succeeds, the console shows a Success message. If an error occurs, it shows on the console window.
Load the changed mosaic dataset into ArcMap or ArcCatalog.