Libraries are files written in C or C++ (.c, .cpp) which provide your sketches with extra functionality (e.g. the ability to control an LED matrix, or read an encoder, GSM, GPS, NRF24L01 etc.). Arduino software is kept flexible users can create there own library or add libraries for new devices.
Adding Library to Arduino
Step 1: Download your library zip file example Keypad.
Step 2: Unzip your library file. You will find files “Keypad.cpp”, “Keypad.h” and folder “examples” in a library name folder in our case Keypad. These three are essential parts of any library.
Note that library folder name should not start with numbers and space is not allowed in library folder name.
Step 3: Find your Arduino Installation Location. By right clicking on arduino shortcut icon. Click on Properties.
Step 4: You will see this screen and Click on Find Target
Step 5: Locate “libraries” folder and open it
Step 6: Copy and paste your library in this folder in our example it is “Keypad”
Check that you have these files in example library “Keypad” folder
Step 7: Close Arduino IDE and reopen it to see the added library in Examples>>Keypad
Step 8: To use library you need to add it in your code using include command.
To see the demo of keypad interfacing visit Matrix Keypad interfacing with Arduino
This way you can add libraries in arduino.