A game engine is a piece of software inteded for game developers. It is almost a complete game; just add content. A game engine is different from a library. A library is meant to help programmers, by implementing functions so that they don't have to. You don't have to be a programmer to use a game engine, unless you want to modify the engine code.
A game engine is easier to use than a library, because you don't have to program. However, as a result, a game engine is much less flexible than using a library, or set of libraries, to program the engine yourself. I feel the best approach to writing a game is to find the most complete, best coded engine in the genre you want to write a game for, and then modify that until it is an engine you can use to write your game. Alternatively, if you don't want to program, you can adapt your game to use the engine.
You can get hundreds of game engines from the internet. Some of them are free. You can do anything you want with these, including selling them alongside your content for a fee. Most of the game engines on the internet, however, are not free. Most of them are closed-source. Often, you have to pay the creators a fee if you use their engine in a commercial product. Sometimes, a game engine is tied to a particular service, and your game can never stop using their service.
I have collected a list of complete and functional free game engines. These engines are, in my opinion, the best in their genre. If you have a better one you would like to recommend, please contact me.
You can use these engines without restriction. Please note, however, that there obligations with certain licenses. For example, with the GPL, you have to include the source code to the engine, or make a written offer to deliver it. Make a point to read the full license of any engines before commiting to using them.
Commercial examples: Starcraft Series, Warcraft I, II and III, Age of Empires Free Engine: Stratagus License: GPLv2 Pros: Cons:
Commercial Examples: Warlord, Lords of Magic Free Engine: Battle of Wesnoth License: GPLv2 Pros: Cons: Maps use a metaformat similar to XML, rather than just XML
Commercial Examples: Doom Series, Quake Series, Half-Life Series Free Engine: Dark Places License: GPLv2 Pros: Cons:
Commercial Examples: Quake III: Arena Free Engine: ioquake3 License: GPLv2 Pros: Cons:
These game engines are not complete. Either they don't have a complete implementation, or not everything necessary is there for you to use to make a game. If you are trying to make a game in one of these genres, I recommend checking these projects out. If you can use it, great. If you can't, you might want to help the project out, so that you can.
Commercial Examples: WOW, Runescape, EVE, Ragnorak Free Engine: The mana world, Worldforge, Planeshift License: GPLv2, GPLv2 Pros: Cons: Worldforge is underdocumented. It is difficult to figure out which files you need to edit to do what, and how to modify them. Planeshift requires the Crystal Space game library, which is also underdocumented. Crystal Space is not yet stable, and it's dependencies are numerous, unstable, and rapidly changing. Planeshift does not have any free content you can use to start your game.
Commercial Examples: Final Fantasy I, II, III, Dragon Warrior I-IV Free Engine: KQ Lives RPG * License: GPLv2 Pros: Cons: A lot of content modifications have to be done in the engine itself.
Commercial Examples: Fallout I, II, Diablo I, II Free Engine: Flexible Isometric Fallout-like Engine License: GPLv2 Pros: Cons: No working game demo. New.
* I am a developer for this game engine.