Generally it is claimed that the tree is a symbol. Very convenient, but the scriptural story gives no indication whatsoever that this is metaphorical. It appears to be a literal story of an angry and spiteful messiah who doesn't know when figs are supposed to be in fruit. (Why would an all knowing messiah look for figs out of season anyway, wouldn't he know the proper season for each fruit? Just asking.)
Now in the morning as he returned into the city, he hungered. And when he saw a fig tree in the way, he came to it, and found nothing thereon, but leaves only, and said unto it, Let no fruit grow on thee henceforward for ever. And presently the fig tree withered away. And when the disciples saw it, they marvelled, saying, How soon is the fig tree withered away!
Matthew 21: 18-20