From Sega Retro
In the razor-and-blade model of business under which the video game industry operates, profit is maximized by continued sale of razorblades (in this case, games) to make up for a lack of sales of the razor itself (the consoles). To ensure the console manufacturer, and not only individual developers, get this profit, manufacturers give development licenses to developers who can afford them to produce games; in some cases, these licensees also get the right to manufacturer the game media. Furthermore, the North American video game market crash of 1983 sent a clear message to console manufacturers — that only select companies get the right to make games so as to not overflow the market with poor quality games.
However over time, independent software developers figure out how to get unauthorized code to run on a game console. In some cases, there is no protection whatsoever and knowledge of the media is all that is necessary to produce unlicensed games (Dreamcast homebrew). In other cases, there is some sort of protection that cannot be legally enforced (Sega's TMSS was ruled unenforceable by US courts; the patent on the 10NES chip that locks out unlicensed NES games has long since expired) or is circumvented without infringing copyright (the Saturn disc swap trick; lock-on NES/SNES unlicensed games). Only in particular cases (the Saturn in particular) is actual hardware modification necessary to run unlicensed software.
With regards to Sega, at present, only Mega Drive and Dreamcast homebrew is being sold for a profit, and Sega has repeatedly stated to these modern developers that it does not care about new software being developed for these systems (so long as its trademarks do not appear in the games). Master System, Game Gear, and Saturn games are devleoped by interest groups, but these (as well as some Mega Drive and Dreamcast games) are not commercially released and can be freely downloaded and played in emulators.
For the purposes of Sega Retro, unlicensed game refer to such games sold for a profit, regardless of whether or not the ROM has been dumped and circulates (which applies to several Mega Drive and Dreamcast releases), while homebrew game refers to those which are not sold (all Master System/Game Gear homebrew made in the past several years fall into this category, as well as a number of other games, such as Pringles Game).