the Fatwa Department Research Committee - chaired by Sheikh `Abd al-Wahhâb al-Turayrî
Deliberate lies and falsehoods must not be employed as a means to make people laugh.
The Prophet (peace be upon him) said: “Woe to the person who gives a speech to people and lies to make them laugh. Woe to him, woe to him.” [Sunan Abî Dâwûd (4990), Sunan al-Tirmidhî (2315), and Sunan al-Dârimî (2702)]
What you are asking about are sarcasm and irony - rhetorical devices in the language which communicate meanings that are clearly understood from their contexts.
Sarcasm is to say something with an underlying insulting or caustic implication. Irony is a form of expression in which an understood implicit meaning is concealed or contradicted by the explicit meaning of the expression. Sarcasm is often used in conjunction with irony. Both of these modes of speech are often conveyed with a particular vocal intonation when spoken and are sometimes rendered with italics when written, like in: “Great! That’s all I need!” or “Oh, very funny”.
What matters is the honesty of the meaning that is being conveyed by the communication, not the literal implications of the words.
For instance, in the example that you give in your question, a person is writing something down. The onlooker can see this, but asks: "Are you writings something?"
The person who is writing responds to the onlooker’s question by saying: “No, I am playing football.”
What he means is: “Of course I am writing, and it is silly of you to ask.” This is the meaning that is communicated and understood.
In English, there are some phrases that are always ironic. Consider when a person says: “Big deal” or “Wise guy”.
Therefore, ironic and sarcastic statements are not lies, any more than figurative speech is a lie. "He was a lion on the football field" is a figurative statement, not a lie - though certainly the football payer is not a great cat.
In the same way, irony and sarcasm are recognized modes of speech which convey an intended meaning understood by both the speaker and the listener.
Irony and sarcasm are therefore quite different than a joke that is a deliberate lie, where the teller of the joke means to communicate a falsehood. Whether or not the listener is aware that it is a lie, what matters is that the speaker fully intends to communicate by what he says a meaning that is false, with the intention of provoking laughter on account of that falsehood.
And Allah knows best.
Source: Islam Today