I am not a lawyer, so the below is only my personal opinion, and understanding:
If you refer to Lazarus, Lazarus comes with more than one license:
LCL: LGPL (with linking exception) see FAQ
IDE: GPL
some other packages with all kind of licenses (e.g MPL)
as for the LCL, which is under LGPL
=> you can write you own application using the LCL (Forms, buttons, ..), and you can put your app under any license that you wish, including close source and commercial.
=> If you modify the LCL itself (and use the modified LCL in public), then you must also release those modifications too the public (as source). However, in this case you only need to release the LCL modifications, the rest of your project would still be allowed closed source.
As for the IDE code, it is GPL, you can *not* use the code of the IDE to build and release a closed source version of Lazarus.
You can write a completely new (from scratch) IDE, using the LCL (but not the IDE code), and that you can make closed source...
---
lcl => code in the lcl directory
ide => code in the ide directory (and a few other directories: codetools, debugger, ...)