The Internet and online social networks have amplified information diffusion processes, but at the same time, they provide fertile ground for the spread of misinformation, rumors, and hoaxes. The goal of this work is to introduce a simple modeling framework to study these phenomena: following the epidemic approach and motivated by results in literature, we look at misinformation as an instance of the more general concept of information diffusion, and we propose an adaption of the classic SIS (Susceptible-Infected-Susceptible) model to the case of misinformation by adding two essential socio-cognitive features: forgetting and competition with fact-checking efforts. First, we focus on how the availability of debunking information may contain the misinformation diffusion. Our approach allows to quantitatively gauge the minimal reaction necessary to eradicate a hoax. Second, we simulate the spreading dynamics on networks with two communities of gullible and skeptic users, with different propensities to believe hoaxes and a segregation parameter that represents the sparsity of links between the two communities. Simulations show that segregation plays an important role in the diffusion of misinformation, but can have different effects varying other parameters. Finally, we validate our model on Twitter data (both fake news and debunking), obtaining good results. Our encouraging findings suggest that fact-checking can be still considered useful in fighting misinformation, but also that the structure of the underlying social network is very important in the spreading process evolution, then further investigation in this direction is absolutely necessary in order to develop new tools and solutions to limit the diffusion of fake news.