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 "Setup MD Test Parameters" region to specify the parameters that control where to create the Mosaic dataset, where to add data from, the raster type to use, and so on.
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 created Mosaic dataset into ArcMap or ArcCatalog.