The question is a little vague. Different kinds of applications are developed different ways, but when you have a lot of moving pieces, then it takes a lot of people to develop those pieces. Each person can work on a tiny piece of it at a time.
lot of programmers like to work remotely, so how do they do it?
Working remotely is just like working in an office. People communicate, collaborate, and work together. Slack is a pretty popular chat tool, but a lot of companies use video chats and virtual whiteboarding as well. A lot of times, if you’re in an office together you usually end up talking to eachother through the same methods you talk to remote workers, so it doesn’t make a difference.
Where I work has a combination of both. I work in an office, but I have an option of working from home. We have a handful of people on my project working remotely and of my team of 4, one of us works remotely from a different state. We use Google Hangouts, Hipchat, and Discord to talk with her.
Some companies don’t promote remote work culture at all. I believe Google, Facebook, or Amazon strongly promote on-site work for whatever reason. There are benefits to both.
Do they have a software for that which maintains all their code? or they use private servers to manage?
Yes, source control is key to any dev shop. We use private GitHub repositories for all of our code, so everything is cloud hosted. I really like that, because I can lay in bed and do code reviews or merge pull requests.
A lot of companies host code in-house and you are need to connect to a VPN before you can use whatever source control solution they use. This increases security, but it really sucks for developer engagement because it’s a hassle.