This is Jesus’ stupidest and most mean-spirited miracle, as reported in the gospels. Here’s the story:
He’s walking the four miles from Bethany to Jerusalem just before Passover (March/April). Here’s Mark: “Jesus was hungry. Seeing in the distance a fig tree in leaf, he went to find out if it had any fruit. (Ooh, look, a bonus! Proof that Jesus isn’t omniscient, and therefore isn’t God!) When he reached it, he found nothing but leaves, because it was not the season for figs. Then he said to the tree, “May no one ever eat fruit from you again.” And his disciples heard him say it. The next morning, as they went along, they saw the fig tree withered from the roots.”

Jesus curses a fig tree, and unwittingly sets up a joke.
So, he’s not omniscient, and he’s petty, and he’s vindictive, and he’s also not very bright – because in the spring there would be leaves but no fruit yet. So he curses it, and the next day it’s completely withered.
What’s the point? Christian apologists tie themselves in knots saying that he did it to symbolize that the Jewish religion, though outwardly in full leaf, is not productive and is destined to die from Jesus’ update to True Religion. But Jesus didn’t say anything about that. When the disciples said “Oh, wow!” he just told them that if they had unwavering faith that yonder mountain could be thrown into the sea, it would happen. (If any of them tried, it didn’t work.) The apologists draw their message out of thin air. They also don’t address Jesus’ hunger, ignorance, anger or stupidity.
It’s a typical Jesus miracle in these aspects:
1) It could be faked – all you have to do is have your friend Lazarus (living in Bethany) come by that evening and pull all the leaves off, and next day the disciples would be fooled into thinking that the tree had withered at Jesus’ command.
2) It’s not the sort of beneficial and glorious thing that you would have chosen if you were writing a story about a real miracle-worker. In that case, you would have Jesus bless the tree instead of curse it, and within 60 seconds it would have fruited and produced enough delicious out-of-season ripe figs to make everyone happy. (And then the apologists would say that he showed how the Jewish religion could be transformed by his blessing into something productive, etc etc.)
Somehow it’s always like that. He heals someone who says they’re lame, or blind, or suffering from devils… but does he ever regrow an amputated limb? Ha! He can restore to life a friend who says he was dead… but what about his spiritual teacher, the man who baptized him, John the Baptist? Why didn’t he put John’s head back on his shoulders, and restore him to life?
Jesus’ miracles are always street magic, designed to engage the audience while he preaches his message of repentance and the return to God… and, probably, while his followers collect contributions for the Zealot uprising.