Bootleg games, sometimes called bootlegs for short and mistakenly called pirated games are unlicensed games that are sold on the market generally using unauthorized content. These can generally be unauthorized ports of existing games (without the original game's publisher's permission), an unauthorized hack of an existing game or an original game that acts as it's related to an official franchise or heavily borrows content from an existing game.
Bootleg games are generally sold in areas where publishers and console manufacturers don't have any control over what games get published for their system. They can generally pass themselves off as an official game or a port of one, a sequel to an existing franchise, or an adaptation of an existing franchise. Most of the time, bootleg games usually don't contain any mention of the original developers/publishers. Similar to licensed games being pirated, other companies may take an existing bootleg game and either re-release it or hack it into another game. Bootleg game carts are generally distributed similarly to pirated game carts and it may be hard to differentiate them apart (unless the title matches a known bootleg game) although bootleg carts can sometimes come in boxes or cases like any other game.
However, not all unlicensed games are considered bootlegs. An example would be Menace Beach by Color Dreams; while not licensed by Nintendo, it doesn't necessarily infringe on trademarks or copyrights. Tengen's NES port of Fantasy Zone isn't a bootleg game either, while being a port of Fantasy Zone and was not licensed by Nintendo, Sega has given Tengen consent to make a port and publish it. Another example is Koko Adventure by Open Corp; despite using graphics from Super Mario World and a sound engine taken from Konami's Tiny Toon Adventures, the game itself does not try to pass itself off as either game and it does not attempt to completely copy either game's gameplay as well. However, Zemina's Super Boy 4 can be considered a bootleg game as it completely copies the graphics and gameplay from Super Mario World despite the name and player's sprites acting as if it was an original game.