If you use the GPL for the license of your project it means that you
can sell the end result, i.e. the binary version, for whatever you want
based the market for said project. The key is that you have to make
available to anyone who wants it the source code for this project. You
can charge a nominal fee to cover the cost of delivering the source code
(if you press CD's of buy ftp services). However, as with the Linux
distros, you don't have to charge for either the binary or the source if
you don't want to.
If you wrote the code then the license doesn't apply to you. The license
applies to others who use the code. You do not have to make available
the code to anyone you don't want to. You can totally sell people the
compiled software without source if you wrote the code yourself even if
it is under the GPL. It'd be a bit odd to do so and someone would
probably wonder what good the GPL does them without source but you could
do it. Of course you can give your code freely to everyone but as the
original author you are not required to do so.
If you actually take lines of source from a GPL licensed project and
use that source in the source for your product then you have created a
derivative product and therefor must license it as GPL. If, however,
your source code only call GPL'ed libraries (said libraries are LGPL'ed)
and/or use make use of external GPL tools and apps in your source you do
not have to release your stuff under the GPL.
If you take a substantial portion of the source of a GPL licensed code
base such that copyright law comes into play then you must make your
code also available under the same license if you redistribute the
program. If you only take one line from a large code base then it's
unlikely to be a substantial part of that code and copyright won't come
into play. Usually libraries are under the LGPL but they can be under
the GPL and likewise non-libraries can be LGPL. There are different
issues with using each license. As with any license you should read it
and understand it before agreeing to it. In the case of software using
the program or code is agreement.