I’ll give you some more definitions too, because it can be confusing with all the terminology going around.
Library - like Kevin said, is a collection of utilities (functions, methods, classes) that you copy into your code (usually by linking, an import
statement, or a #include
in other languages like C++). Your code then calls these utilities. Examples of libraries are jQuery, lodash, polymer, axios, and react (JavaScript); other languages have libraries too like iostream (C++), etc. If your code is a house, then a library would be a light switch or a sink. They each achieve a specific individual purpose and don’t care about how other things work (i.e. using a sink has nothing to do with using a lightswitch).
Framework - A large, opinionated skeleton that you start from and add your code too. Examples would be Bootstrap (HTML), Angular and Vue (JS), .NET (C#). If your code is a house, then a framework would be like the blueprint for a kitchen - it gives an idea of what this room should be and what it should have, but you have to implement the necessary items inside like sinks, lights, tables, etc.
Tool - helps you build a project. If we continue my analogy, then a tool would be like a screwdriver. An example would be Gulp or Webpack.
Engine - a program that calls the code that you write. An example would be Node.js which is a C++ program that calls your JavaScript code and runs it.
API - a way to access certain data or a certain service. For example, the OpenWeatherMap API is a simple way for you to get weather data.
SDK (Software Development Kit) - A collection of API’s and utilities (tools, compilers) to accomplish a certain thing.
Here’s a much better run down than I can do: Best JavaScript Frameworks, Libraries and Tools to Use in 2019 — SitePoint