You have heard about shared libraries in the context of Jenkins Pipelines. What is a Jenkins Pipeline shared library?
i. Groovy-based DSL.
ii. Groovy code and compiled programs.
iii. Java code and compiled programs.
iv. variables and other artifacts possibly in directories named /vars, /src, and /resources.
One big benefit of using a shared library is that it makes other Jenkins Pipelines easier to maintain by keeping one group of common files, configuration settings and variables in one place (1). Abstracting out the shared values and files you create an opportunity to have individual Jenkins Pipelines be of minimal sizes. (1)
The term shared library is used in the context of the C programming language. To learn more about this see this link.