What are KiCAD .lib files?

.lib files in KiCAD contain schematic symbols, for example

or

whereas this is a footprint which is not stored in .lib files:

Note that one .lib file typically contains more than one schematic symbol.

KiCAD .lib files begin with

EESchema-LIBRARY Version 2.4

(the version might be different depending on the version of KiCAD you are using)

Here’s an example for a simple library:

EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# Amplifier_Operational_AD8603
#
DEF Amplifier_Operational_AD8603 U 0 5 Y Y 1 F N
F0 "U" 0 200 50 H V L CNN
F1 "Amplifier_Operational_AD8603" 0 -200 50 H V L CNN
F2 "Package_TO_SOT_SMD:TSOT-23-5" 0 0 50 H I C CNN
F3 "" 0 200 50 H I C CNN
ALIAS OPA188xxDBV
$FPLIST
 TSOT*23*
$ENDFPLIST
DRAW
P 4 0 1 10 -200 200 200 0 -200 -200 -200 200 f
X V- 2 -100 -300 150 U 50 50 0 1 W
X V+ 5 -100 300 150 D 50 50 0 1 W
X ~ 1 300 0 100 L 50 50 1 1 O
X + 3 -300 100 100 R 50 50 1 1 I
X - 4 -300 -100 100 R 50 50 1 1 I
ENDDRAW
ENDDEF
#
#End Library

This library defines the schematic symbol for the operational amplifier shown above. The example is from the KiCAD standard library.

Also see the official guide on KiCAD file formats.