It's best to get software from your distribution's repository. If you asked from a typical KDE thing, like Dragon player, on a Gnome system, there might be a lot of dependencies to download that a KDE user would already have, but the installer will take care of that.
What if your distro doesn't have it? You can download a package from somewhere else and try installing it. For example, the program's developers may offer a deb package. If you have a Debian based system, like Mint or Mepis, you could try installing it with dpkg. If it doesn't work, it's no distaster. It usually does, because all the deb using distros are ultimately based in Debian, so they tend to use similar names for libraries. The rpm packages are a different matter, because that format is used by unrelated distros. A package made on Mageia may refuse to install on Fedora, not because it wouldn't work, but because it says it needs library wigitlib and Fedora has called it libwigit.
Compiling the source code yourself means you have to read the instructions carefully and make sure you have all the dependencies installed, but it's not difficult: just slower.