Sometimes a level editor is integrated in the game, and is an integral part of the game. Other times (and most often), it is a separate part of the game. The latter is almost always the case for fan-released level editors.
A level editor is often used to create levels for a certain game engine. Developing a level editor takes a lot of time and it is more efficient to release multiple games using the same engine instead of developing a new engine and level editor for each game.
To make larger changes to a game than simply adding new levels, a Software Development Kit (SDK) is sometimes needed.
In the early years of video-gaming, some games came with a utility called a Construction set. This was similar in many ways to a level-editor. Some games used them to create extra levels, whereas others (like the Shoot'Em-Up Construction Kit) used them as a means to create a game rather than be a game in itself. Some examples of games with Construction sets include: