I downloaded the tor browser from Ubuntu Software Center but it doesn't work, and shows this message:
but when I downloaded it from the tor website then it worked.
That's not how it's supposed to be. You only download the Tor Browser from their official website (torproject.org).
From its looks it seems that you're using Micah Lee's Tor Browser Launcher, which you also shouldn't download from the Software Center, rather use,
sudo add-apt-repository ppa:micahflee/ppa sudo apt-get update sudo apt-get install torbrowser-launcher
In any case, to solve your problem use this command:
gpg --homedir "$HOME/.local/share/torbrowser/gnupg_homedir/" --refresh-keys --keyserver pgp.mit.edu
That should fix your problem.