Are there any examples of someone pulling a prank or other practical joke on another person in the talmud?
There is one clear prank story found in Talmud Bavli. The text of the story is found in (Nedarim 50b):
רבי עבד ליה הלולא לר"ש ברבי כתב על בית גננא עשרין וארבעה אלפין ריבואין דינרין נפקו על בית גננא דין ולא אזמניה לבר קפרא אמר ליה אם לעוברי רצונו כך לעושי רצונו על אחת כמה וכמה אזמניה אמר לעושי רצונו בעולם הזה כך לעוה"ב עאכ"ו:
§ The Gemara relates: Rabbi Yehuda HaNasi made a wedding for Rabbi Shimon, son of Rabbi Yehuda HaNasi. Someone wrote on the canopy: 24,000 myriad dinars were expended on this canopy, and nevertheless Rabbi Yehuda HaNasi did not invite bar Kappara to the wedding. The insulted bar Kappara said to Rabbi Yehuda HaNasi: If to those who transgress God’s will, i.e., you who act improperly, their reward is such, as Rabbi Yehuda HaNasi was very wealthy, all the more so those who perform His will are to be rewarded. Upon hearing his reaction, Rabbi Yehuda HaNasi invited him. Bar Kappara then said: If to those who perform His will their reward is such in this world, all the more so will they be rewarded in the World-to-Come.
I think we would all consider the writing on the canopy to be a prank by Bar Kappara, as seems to be the simple understanding of the Gemara (and hence "and nevertheless Rabbi Yehuda HaNasi did not invite bar Kappara to the wedding"). This is especially notable as Rashi comments that Bar Kappara was a prankster, and that was the reason why Rebbi did not invite him. See various other answers which discuss some of Bar Kappara's antics.
It's also very worthwhile to see the story in this book, which narrates the prank excellently.
Bar Kappara (possibly Eliezer haKappar, possibly his son Shimon) was a tanna who was known, within the Talmud, for his unusual antics and unchecked speech. In Nedarim 51a, for example, he causes Rebbi to laugh out loud by placing a basket upside-down on his head. In Moed Qatan 16a, he appears to play a prank on Rebbi's unlearned son-in-law, Bar Elasah - causing Rebbi to rebuke him.
The Yerushalmi's version of this event (Moed Qatan 3:1, 81c), has him delivering a riddle to Rebbi via Rebbi's son-in-law, at such a time as a group of sages were all asking learned questions of him. When Bar Elasah related what Bar Kappara told him to ask and Rebbi saw Bar Kappara grinning, he rebuked him strongly.
Here is the text of Bar Kappara's riddle, as delivered by Bar Elasah. What follows is the translation of Artscroll:
משמים נשקפה הומיה בירכתי ביתה מפחדת כל בעלי כנפים ראונו נערים ונחבאו וישישים קמו עמדו הנס יאמרו הו הו והנלכד נלכד בעונו
From heaven she gazes down; she is tumultuous in the recesses of her house; she frightens all those that have wings [to flee]. “The young men saw me and hid themselves, but the aged arose and stood up” (Iyov 29:8). The one who flees calls out [in despair], “Ho! Ho!”; but the one who is trapped became trapped in his sin!”
I don't know what this riddle means (I asked about it once before*), but it certainly seems to fit the bill of being a practical joke of some description.
*Some of my answer here is copied and pasted from that question.
The following does not seem to have been in good fun, but @Yez's comment asking if this counts was not answered.
רב הוה קא מצערא ליה דביתהו כי אמר לה עבידי לי טלופחי עבדא ליה חימצי חימצי עבדא ליה טלופחי כי גדל חייא בריה אפיך לה אמר ליה איעליא לך אמך אמר ליה אנא הוא דקא אפיכנא לה אמר ליה היינו דקא אמרי אינשי דנפיק מינך טעמא מלפך את לא תעביד הכי שנאמר למדו לשונם דבר שקר העוה וגו
Rab was constantly tormented by his wife. If he told her, ‘Prepare me lentils’, she would prepare him small peas; [and if he asked for] small peas, she prepared him lentils. When his son Hiyya grew up he gave her [his father's instruction] in the reverse order. ‘Your mother’, Rab once remarked to him, ‘has improved’! ‘It was I’, the other replied, ‘who reversed [your orders] to her’. ‘This is what people say’, the first said to him, ‘Thine own offspring teaches thee reason’; you, however, must not continue to do so’ for it is said, They have taught their tongue to speak lies, they weary themselves etc’. (Soncino translation)
Authenticity issues aside, the "incident of Beruria" cited by Rashi to Avodah Zarah 18b sounds like a prank gone wrong, and it is about Talmudic characters.
שפעם אחת ליגלגה על שאמרו חכמים נשים דעתן קלות הן עלייהו ואמר לה חייך סופך להודות לדבריהם וצוה לאחד מתלמידיו לנסותה לדבר עבירה והפציר בה ימים רבים עד שנתרצית וכשנודע לה חנקה עצמה וערק רבי מאיר מחמת כסופא
One time she mocked that which the Sages stated, "the intellect of women is light unto them". He said to her, "by your life, your end will be to admit to their words". He commanded one of his students to seduce her to a matter of sin. She resisted for many days until she acquiesced. When it became known to her, she strangled herself and R. Meir fled out of shame.
יצא רבי חייא ושנה לשני בני אחיו בשוק לרב ולרבה בר בר חנה שמע ר' איקפד אתא ר' חייא לאיתחזויי ליה א"ל עייא מי קורא לך בחוץ ידע דנקט מילתא בדעתיה נהג נזיפותא בנפשיה תלתין יומין
Despite Rabbi Yehuda HaNasi’s decree, Rabbi Ḥiyya went out and taught his two nephews, Rav and Rabba bar bar Ḥana, in the marketplace. Rabbi Yehuda HaNasi heard what he had done and became angry with him. When Rabbi Ḥiyya came at some later date to visit him, Rabbi Yehuda HaNasi mockingly said to him: Iyya, who is calling you outside? By asking this question Rabbi Yehuda HaNasi was intimating that Rabbi Ḥiyya should leave his house. Rabbi Ḥiyya understood that Rabbi Yehuda HaNasi had taken the matter to heart and was insulted, and so he conducted himself as if he had been admonished, as a self-imposed punishment, for thirty days.
ת"ר מעשה בהלל הזקן שהביא עולתו לעזרה לסמוך עליה ביו"ט חברו עליו תלמידי שמאי הזקן אמרו לו מה טיבה של בהמה זו אמר להם נקבה היא ולזבחי שלמים הבאתיה כשכש להם בזנבה והלכו להם
§ The Gemara returns to the basic dispute between Beit Shammai and Beit Hillel. The Sages taught in a baraita: There was an incident involving Hillel the Elder, who brought his burnt-offering to the Temple courtyard in order to place his hands on the animal’s head on a Festival. The students of Shammai the Elder gathered around him and said to him: What is the nature of this animal that you are bringing? Hillel, being humble and meek, did not want to quarrel with them in the Temple and therefore concealed the truth from them for the sake of peace. He said to them: It is a female, and I have brought it as a peace-offering, as burnt-offerings are always male. He swung its tail for them so that they would not be able to properly discern whether the animal was male or female, and they departed.