The GPL does not prohibit you from selling programs based on the GPL code, but it requires that if you give your program to someone (including selling it), you must also provide them with source code licensed under the GPL so that they can change and redistribute it if they want. Anyone who buys your program can distribute it to others for free.
LGPL does not require you to distribute the source code of programs that link to the LGPL library, so you can use them in a closed source application. (If you are distributing the LGPL library yourself, you should still provide your customers with the source code for this.)
This is a simplification. For more information, see the licenses themselves and / or talk with a lawyer.
source share