Functionalism is a position in philosophy of mind which argues that mental states consist essentially of the role that they play in the functioning of the organism. Functionalism is neither physicalist nor dualist perspective, since it does not describe the mind and body as separate substances, nor does it reduce the mental to its physical components.
Functionalism describes the mind as a layer of abstraction, functioning between the physical body and its output, that is, behaviour. This functional layer of mind recieves input from the body's senses and from other mental states within itself, and then prepares and executes output by means of behaviour. This seems like a computer program quite intentionally — functionalism suggests that the mind forms a sort of biological computer, taking input and processing it much like a sophisticated computer.
As computer software is an abstraction of the electrical and magnetic signals within a computer's structure, so too is the mind an abstraction of the physical process within the brain. And just as sophisticated software becomes incomprehensible if we reduce it to its flow of electrons through circutry, it is not useful to reduce any mental state, or consider it identical, to its corresponding physical activity. (Although the computer analogy may be different in that data seems to not be lost when we examine the electrons or bits at their basic level, they are unintelligible without the higher levels which are meant to decode them.)
The analogy of the computer is useful for functionalism because it shows how the mind is more complex than the functionality of other organs, such as the heart, which have a simpler purpose, such as pumping blood through the circulatory system.
See: mind-body problem