gdb = GNU Debugger. It is a tool used for dynamic analysis, e.g. analysing a programs runtime behaviour, as opposed to its static source code, which is analysed using static analysis.
Essentialy, GDB lets you run binaries and see exactly what they are doing, by being able to stop the code at any point and inspect the state of the machine. GDB can also change the programs behaviour, by patching instructions, memory, or registers at runtime.
start gdb
inspect the binary
inspect the code
set breakpoints
inspect / examine memory
stepping / continueing etc
Changing regs
backtrace
using the commands instruction
creating a better interface using the commands instruction
gdb-peda
gef
writing your own
show some of the nice stuff gef implements
Conditional breakpoints
using commands instruction for on the fly patching
setting variables
using gdb as remote debugger