Metaprogramming

I can't seem to fully wrap my head around what metaprogramming really is. Could someone explain it more in depth or show some code?