Middleware is software/components that sit in the "middle" of architecture. You will see this most often with large and complex backend systems. Third party companies write easy to understand interfaces that expose backend functionality or perhaps combine that functionality with additional features. You/your company buy the middleware to reduce the cost of developing and managing your applications that interface with this monsterous backend system.
Sometimes, this middleware is exposed in the form of web services or WCF services as part of SOA (service oriented architecture). Sometimes, it is in the form of class libraries you include references to in your app. It varies.
Middleware can be written in just about any language or process that is consumable with other languages/processes. .NET is one of course. Java is also a common alternative.
User Interface ->
Middleware ->
Some backend system you don't know how to interact with