Window method

What does this method mean?
CGRect windowFrame = [[UIScreen mainScreen] bounds];
*theWindow = [[UIWindow alloc] initWithFrame:windowFrame];
[self setWindow:theWindow];
and what does the “self” refer to?