A digital signature is a small piece of unique code that is used by software (typically an operating system) to determine if 3rd party software is approved for use.
A 3rd party software company submits a sample of its product to an OS maker like Apple, Microsoft, Nintendo etc., and the maker determines if the software is suitable for their platform. This may mean passing compatibility tests, legal review, patent review, etc. - the exact criteria varies from one company to another. The software company decides either to "sign" the software or not. If the signature is granted, the maker provides the signature to the 3rd party software company, who then embeds the signature in their product and ships the "signed" product to consumers.
Sometimes the maker's OS is programmed to run only "signed" software. Other OSs might allow both "signed" and "unsigned" software to run, but they are treated differently, or a warning is shown that indicates that the user is attempting to run 3rd party software that hasn't been vetted by the maker of the OS.
Digital signatures are nearly impossible to forge because they are based on cryptography (mathematical problems that are hard to solve). But, as with any software, there are occasionally implementation flaws that people discover that may allow a savvy developer the ability to fool an OS into running unsigned software or software containing a forged signature.
http://en.wikipedia.org/wiki/Unsigned_code
http://technet.microsoft.com/en-us/library/cc962053.aspx
http://en.wikipedia.org/wiki/WHQL_Testing
http://www.gdgsoft.com/pb/pbhelp/digitalsign.html