It may seem counterintuitive, but using open-source software code does not always require you to open up your source code. There are more than 50 approved open-source licenses, and many of them permit licensees to use or modify code without requiring the distribution of source code for the resulting work.
Copyleft licenses are a different story. Conceived by Richard Stallman, the founding figure of the free software movement, copyleft is a means of ensuring that everyone is free to use, copy, modify, and distribute software. Copyleft software is released under a license that allows downstream recipients to freely use, copy, modify, and redistribute the code, but it also requires any redistribution of the original code and derivations of it to fall under the same license. See Free Software Foundation, Inc., What Is Copyleft?, GNU Operating System.
Among copyleft licenses, the GNU General Public License (GPL) and Lesser General Public License (LGPL) are the archetypes, and they're some of the most popular. Stallman first wrote the GPL in 1989. His Free Software Foundation (FSF) released an updated version (GPLv2) in 1991, which became the most widely used free-software license. In 2007, the FSF released a new version of the GPL (GPLv3) that was designed to address some of the shortcomings of GPLv2, especially with respect to embedded systems. (The obligations created by GPLv2 and GPLv3 are substantially identical in many respects, and I refer to them collectively as "the GPL" when there is no need to distinguish between them.)