Full details are on MSDN:
String.Format method[
^]
But in essence, String.Format takes a variable number of parameters (one or more) and returns a string made up from the various parts you give it.
It you pass it two or more parameters, the first one must be a string, and controls how the others are used. If any part of the string is enclosed in '{' and '}' then it refers to the other parameters, and will be substituted. Normally, the contents of the '{' and '}' pair is a numeric refenece by parameter number, satrtign from zero, but it can also contain formatting information for that parameter.
For example
String.Format("EXEC {0} /INDEX={1}", "ProgramName", 123);
would return a string:
"EXEC ProgramName /INDEX=123"