SDL_GetTicks() returns the number of milliseconds since the SDL library initialization as an unsigned, 32-bit integer. This is made clear in the documentation Peter87 provided. Ctrl+F your query function.
This is it.
http://www.libsdl.org/release/SDL-1.2.15/docs/html/sdlgetticks.html
Since 1000 milliseconds = 1 second, and our FPS is supposed to be 30 in this case, we divide 1000 milliseconds by 30 frames
in order to to get the number of milliseconds that should pass for each each individual frame. This number (different for each possible frame rate) is then compared with the number of milliseconds since the start of the event loop.
Since SDL_GetTicks() = ms since SDL_Init(SDL_INIT_EVERYTHING)
and
start = the number of milliseconds since SDL_Init
as of the assignment at the beginning of the event loop (each time around)
SDL_GetTicks() - start = the number of milliseconds since this time around in the event loop.
If the number of milliseconds this time around in the event loop (this is where we would presumably render a frame of some animated nature, corresponding to some user input) are less than 1000/FPS, then the frame rendered too fast, and we wait until the rest of that period (1000/FPS-(SDL_GetTicks()-start)) before looping around the event loop again and rendering another frame.
But because this is just a demonstration of frame rate capping, we have nothing to render, and like Peter87 said, you will not immediately notice any benefits.