Yeh they are all in the manual...

PANEL* panDisplay =
{
digits(35, 10, "a = %0.f", *, 1, a);
flags = VISIBLE;
}

the first line is creating a digits element. This allows you to show numbers on a panel. flags are just a set of switched that change the way the panel works, so VISIBLE lets the user see it.

A while loop allows a piece of code to run again and again until something is true. While(1) means run forever as 1 is the integer value for the boolean true.

wait(1) allows other functions and objects to get attention. If there was no wait() then the function would use up most resources and the program would crash.

All this is very basic programming, and can definetely be found in the lite-c workshops. Are you reading the .chm files or just looking at the codes. You have to read the helpfile.