Stupidity usually refers to a lack of intelligence. People may also act in stupid ways because they don't know better. Comedy often uses stock characters, that are stupid; very often these are called fools. 