Library: Reusable code written by someone else that you call when you need it for a specific job, such as formatting dates, reading Excel files, or making HTTP calls. Unlike a framework, your own code stays in control.

Example

Instead of writing your own date formatting logic, you add a date library to the project and call one function to show "27 Oct 2026" on the screen.

Library vs Framework

You call a library when you need it. A framework calls your code and decides the overall structure. In practice, a project usually uses one main framework and many libraries.

How Libraries are Added to a Project

LanguagePackage managerWhere libraries are listed
JavaMaven or Gradlepom.xml or build.gradle
JavaScriptnpm or yarnpackage.json
Pythonpiprequirements.txt or pyproject.toml
C#NuGetthe .csproj file

Each library becomes a dependency of your project.

Choosing a Library Safely

  • Check whether the team already uses a library for the same job.
  • Prefer well-known, actively maintained libraries.
  • Check the licence; some are not allowed in company products.
  • Ask before adding a new dependency in a team project; it affects everyone.

Related terms

  • Framework: the larger structure that calls your code.
  • SDK: a toolkit that often includes libraries.
  • Dependency: what a library becomes in your project.
  • API: the functions a library exposes are its API.

Previous term: Large Language Model (LLM)  |  Next term: Logging

Related guides

Frequently asked questions

What is a library in programming?

A library is reusable code that provides ready-made functions for a specific job, which your program calls when needed.

What is the difference between a library and a framework?

You call a library. A framework controls the flow of the application and calls your code.

What is a package manager?

A tool, such as npm, pip, Maven, or NuGet, that downloads libraries and keeps track of their versions.

Can I add any library to a company project?

Ask first. Teams check maintenance, security, and licences before adding new dependencies.

Explore more internship terms

The IT Internship Glossary explains 199 terms you will hear before and during your internship, with simple definitions and real examples.

Browse all 199 terms
Dhaivat Ajwaliya

About the author

Dhaivat Ajwaliya

Dhaivat has 16+ years of experience in the IT industry, working on AI and cloud technologies, project delivery, and engineering leadership. He has interviewed and mentored many interns, wrote The Lost Intern, and runs the non-commercial Career Impact Initiative, mentoring students for free.