Buffer overflows occur in languages that allow direct memory manipulation and lack bounds checking, like C and C++. They happen when a program writes more data to a buffer than it can hold, overflowing into adjacent memory. Java (D) and C# (C) are managed languages with automatic bounds checking that prevent buffer overflows. 'Any file type on a web server' (B) is nonsensical in this context.