Shellfish, such as mussels, cook quickest if you do not add many other ingredients. If you steam them in their own juices, it is a matter of minutes. As soon as you see that the shells are open, they are cooked. Because the pan is always hotter at the bottom than it is at the top, it's a good idea to give them a good shake as soon as you see they are boiling.
If you are using shellfish in a curry, for example, you also have to take the preparation time of the sauce into account. So first prepare your base and only add the shellfish at the end. If you don't, they will cook too long and get tough. Again, the shellfish are done as soon as their shells are all the way open. This may take a little longer, because they are cooking in the sauce and not steaming in their own juices.