Literally to function badly.
A mistake made by a machine. When a machine malfunctions, it is usually due to mechanical failure. For instance if a car engine stops when ever the speed of the car dips below 10 the engine is malfunctioning.