A program is a set of instructions that tells your computer what to do
A program (also called software or an process) is a list of commands written in a language the computer understands. When you run a program, the computer reads those instructions one by one and carries them out. Every app on your phone, every website you visit, and every file your computer opens is controlled by a program somewhere.
Think of it like a recipe. A recipe tells you to mix flour, add eggs, bake at 350 degrees—in that order. A program does the same thing, except the instructions are "read this file," "show this image," or "send this data to the internet." The computer follows them exactly, in the order they are written, unless the program tells it to skip ahead or repeat a step.
Programs are written by people called programmers or developers using programming languages like Python, Java, C++, or JavaScript. These languages let humans write instructions in a way that is closer to English, and then special tools convert those instructions into the 1s and 0s that the computer's processor actually understands.
Key Takeaways
- A program is a set of written instructions that a computer follows to perform a task, from opening a file to running a video game.
- Programs are written by developers in programming languages and then converted into machine code that the processor can execute.
- Every process on your device—your email client, web browser, calculator, or word processor—is a program.
- Programs can be stored on your computer's hard drive, downloaded from the internet, or run directly in your web browser.
- A program stays running and waiting for input until you close it or it finishes its task.
How a program gets from the programmer's desk to your computer
A programmer writes code—the human-readable instructions—in a text editor or specialized tool. That code is then compiled or interpreted, which means it is converted into machine code: the binary instructions the processor actually runs. Some languages compile the code all at once before you run it; others interpret it line by line as the program runs.
Once the program is ready, it is packaged into a file (like an .exe file on Windows, a .app on Mac, or an .apk on Android). You read that file, install it on your computer, and when you click it, the operating system loads it into memory and tells the processor to start executing the instructions inside.
Some programs, like web applications, do not need to be installed at all. Instead, they live on a server somewhere on the internet. When you visit the website, your browser downloads the program code and runs it right there in the browser window. Gmail, Google Docs, and Figma all work this way.
What happens when you run a program
When you double-click a program icon or select it from a menu, the operating system (Windows, macOS, Linux) finds the program file and loads it into your computer's RAM (memory). The processor then begins reading and executing the instructions inside, one at a time.
The program stays in memory and keeps running until one of three things happens: you close it, it crashes, or it finishes its task and exits on its own. While it is running, the program can read files from your hard drive, display windows on your screen, respond to your mouse clicks and keyboard typing, and send data over the internet.
If a program is waiting for you to do something—like type a search query or click a button—it pauses and listens. The moment you give it input, it wakes up and executes the next set of instructions. This back-and-forth between the program and the user is what makes software interactive.
Different types of programs and what they do
Programs fall into broad categories based on what they are designed to do. System programs manage the computer itself: the operating system, drivers (which let hardware like printers work), and utilities that clean up files or manage storage. process programs do work for you: word processors, spreadsheets, photo editors, email clients, and web browsers.
Games are programs that simulate an environment and respond to your input in real time. Web applications run inside your browser and often store your data on a server so you can access it from any device. Mobile apps are programs built specifically for phones and tablets and are usually downloaded from an app store.
There are also background programs that run without a visible window: antivirus software scanning your files, a music player streaming audio, or a cloud storage service syncing your folders. You may not see them, but they are executing instructions just like any other program.
Why programs sometimes crash or freeze
A program crashes when it encounters an instruction it cannot complete or when something goes wrong that the programmer did not plan for. Maybe the program tries to open a file that no longer exists, or it runs out of memory, or two parts of the program try to use the same resource at the same time. When that happens, the operating system stops the program and closes it.
A program freezes when it gets stuck waiting for something—a file to read, a response from the internet, or a piece of hardware to finish a task. If the wait takes too long, the program appears to hang. You can usually force it to close by using the task manager (on Windows) or force quit (on Mac), and then restart it.
Programmers try to prevent crashes by testing their code thoroughly and handling errors gracefully, but no program is perfect. Updates and patches are released to fix bugs (mistakes in the code) that users discover after the program is released.
How programs talk to each other and share data
Programs do not work in isolation. Your email client needs to talk to the internet to fetch your messages. Your photo editor needs to read image files from your hard drive. Your web browser needs to communicate with servers around the world to load web pages.
Programs share data through files (documents, images, videos stored on disk), the internet (sending and receiving data over networks), and APIs (process programming interfaces—a set of rules that let one program ask another program to do something). When you save a document in Word and then open it in Google Docs, both programs are reading and writing the same file, following a shared format so they understand each other.
Operating systems also provide a middle layer that lets programs request services without having to know all the technical details. When a program wants to print something, it does not need to know exactly how your printer works; it just asks the operating system, which handles the rest.
Open-source and closed-source programs
Some programs are open-source, which means the code is published publicly and anyone can read it, modify it, or create their own version. Linux, Firefox, and VLC media player are open-source. This approach lets many programmers contribute and spot problems quickly.
Closed-source (or proprietary) programs keep their code secret. Microsoft Office, Adobe Photoshop, and most games are closed-source. The company that owns the program controls what changes are made and when updates are released. Closed-source does not mean the program is worse; it just means you cannot see or modify the instructions inside.
Both approaches have trade-offs. Open-source programs are often free and transparent, but may have less polished user interfaces. Closed-source programs are usually more refined and come with customer support, but you have to trust the company and pay for them.
Frequently Asked Questions
Is every app on my phone a program?
Yes. Every app—whether it is a game, a messaging service, a calculator, or a social media client—is a program. Mobile apps are written in languages like Swift (for iPhone) or Kotlin (for Android) and run on your phone's processor just like programs run on a computer.
What is the difference between a program and a file?
A program is a set of instructions that does something. A file is a container that holds data—text, images, video, or code. A program file contains the program code. A document file contains the data the program created. You can have a program without a file (if it is running in memory), but a program file is always a file.
Can I write my own program?
Yes. You can learn a programming language like Python, JavaScript, or C++ and write code that tells the computer what to do. Many free resources and tutorials exist online. Start with a straightforward language like Python, which reads more like English than other languages do.
Why do programs need updates?
Updates fix bugs (mistakes in the code), add new features, and patch security holes that hackers could exploit. A program written years ago may not work well with newer hardware or operating systems, so updates keep it running smoothly and safely.
What happens to a program when I turn off my computer?
Any program running in memory is stopped when ready. If the program had unsaved work, that data is lost. That is why programs ask "Do you want to save?" before closing. The program file itself stays on your hard drive and can be run again the next time you turn the computer on.