hmmm...depends...
There are some IDE that give you function like those amando96 said...but there are others that don't.
The most simple solution is something like this:
void delay(int a)
{
int i;
for (i = 0; i < a; i++)
{
_nop();
}
}
main(void)
{
....
delay(100000);
....
}
Also depends on what uC you use. The one i worh with has the _nop() function that does NOTHING, but wait for a tick. Here comes the frequency setup. But in my example, the function will delay around 1.25ms , with 80MHz frequency.
I say around, because there are others ticks lost when the compiler transforms the C code into ASM.