When I installed on my desktop mpd and mpc, I found that I can't hear other sources (like Amarok, Flash player etc.) at the time when mpc or other client is playing music. If I try to start an audio stream with two Flash players in two tabs, I have the same problem.

How to solve it?
I have installed PulseAudio with default system settings and Jackd. How do I configure it for multiple sound sources?

The actual problem you're having is that -- probably -- mpd is configured to use ALSA by default. Did you know that mpd has a PulseAudio backend? Look at /etc/mpd.conf.

Anyway, mpd and mpc is a silly way to play music if you're just doing it locally. mpd is really designed for network streaming, like to run a streaming radio station. There are many other programs that will use PulseAudio natively, such as Rhythmbox, which requires zero configuration.

@terdon's answer should help if you have programs that are using the Safe ALSA Subset and respect libasound2 plug-layer configuration. But if any one program tries to open hw:0 or a similar direct-to-hardware ALSA device, it will prevent PulseAudio from working properly, and will block out all other access to the sound device.

I also don't know why you are trying to use jackd, since that is normally only for high-end audio work such as in Digital Audio Workstations (DAWs). Installing it probably didn't activate it (fortunately) or you'd have an even bigger mess.

A few things about your post make me think that you are making this entirely too difficult:

You "installed" PulseAudio. Why wasn't it installed by default?

You "installed" jackd. What made you think that doing that would be a good idea? Do you need to run a program that only runs on JACK, such as Ardour2?

You seem to need to play with configuration files such as /etc/asound.conf. This really should not be necessary.

It sounds like you are trying to run an extremely, extremely old version of Debian. Honestly, any distribution that is not from at least 2011 (and Debian Squeeze doesn't count) is not going to have a good out-of-the-box audio experience. My recommendation is to go with the latest stable release of Ubuntu, Linux Mint, OpenSUSE, or Fedora.

Old versions of Debian (and other distros, too) have a very poor out of the box audio experience, where things don't "just work" and have to be manually configured. So the fact that you had to install PulseAudio, when it has been shipped and enabled by default on distros since 2008, tells me you are running an ancient OS. It's free; you should upgrade rather than trying to manually re-do what distributions have done flawlessly through a lot of research and development over the past 5 years.