SetLevel iNewLevel, LevelToPCFlag, MinLevel (optional), MaxLevel (optional)
In theory, if the LevelToPCFlag is set to 1 then the level provided is an offset to the player's level, which will not take their level above or below the provided maximum and minimum levels. In practise, the function does not work correctly when called on NPCs- SetLevel will often (if not always) set their level to the provided MinLevel, disregarding any level offset, maximum or anything else.
This function can be called on the player and will change the player's level, but not any of his stats (and the world will not "level up" with the player), so this is not recommended. Use RewardXP instead.
Calling SetLevel on an actor other than the player will cause that actor's inventory to be regenerated, re-evaluating any leveled lists that may make up the actor inventory. You can witness this in action by finding a random raider and calling setlevel on them via the console. They will usually end up wearing a different piece of armor, because their inventory was repopulated. This repopulation effect takes effect even if the SetLevel command did not change the actor's level.