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, open the solution file, and build the project.
Start ArcMap and add an existing map.
Click Customize, then click Customize Mode.
Click the Commands tab and select the Add-in Controls category.
Click and drag Publish a PMF Map from the Commands list onto a toolbar.
Click the Publish a PMF Map add-in command to publish the Published Map File (PMF) map to C:\PublishMap.pmf.