The source code of a program are the written lines of code in a specific programming language. After this code is compiled into something that your computer can understand, like an executable, the source code is not visible. However, if developers chose to make their source code public, the program is open source. If they chose to do not, it is closed source.
Source code that is open source doesn’t mean you can do whatever with the code. It’s still property of the developer and in most cases it is licensed in a way that says how you can use or change the code. For example some licenses require that any software created using the source code also needs to be released as open source, with full credit to the original developers, so improvements can go back to the community.
Using open source appeals users for different reasons: low or no cost, access to source code they can change themselves, a large community that ensures quick fixes for any new issues that surface and it is perfect clear what the programs does behind the scenes, not unimportant towards privacy concerns.
Large corporations like Microsoft or Apple are known for keeping most their code to themselves and don’t allow others to see, use, or improve upon it. Of course, the closed-source choice often makes sense from a business standpoint.
So large companies have the intention to keep all of their software closed source. Are open source programs not profitable for companies? If they are not created by companies, who invest their valuable time in writing them?