Selecting an appropriate machine learning algorithm? I do not think that this is a difficult question, but I guess someone needs experience to answer it. It is a question that is asked a lot here, but I did not found any answer that explains the reasons of choosing an appropriate ML algorithm.
So, let's suppose we have a set of data. And let's suppose I want to do clustering (This could be classification or regression if I also had labels or values or my training set data).
What should I consider before choosing an appropriate algorithm? Or I just choose algorithms in random? 
In addition how I choose any data preprocessing that can be applied at my data? I mean are there any rules of the format "IF feature X has property Z THEN do Y"?
In addition are there any other things except preprocessing and choosing my data that I miss and you want to advice me about them?
For example, lets suppose that I want to do clustering. Is saying "I will apply k means at that problem" the best approach? What can improve my performance?
I will chose as best answer the answer that is much more justified and explains everything that someone should consider.
 A: 
are there any rules of the format "IF feature X has property Z THEN do Y"?

Yes, there are such rules. Or rather, if x then is is sensible to try y and z and avoid w.
However, what is sensible and what is not depends on


*

*your application (influences e.g. expected complexity of the problem)

*the size of the data set: how many rows, how many columns, how many independent cases

*the type of data / what kind of measurement. E.g. gene microarray data and vibrational spectroscopy data often have comparable size, but the different nature of the data suggests different regularization approaches.

*and in practice also on your experience in applying different methods.



Without more specific information I think that is about as much as we can say.
If you want to have a general answer to the general problem, I recommend the Elements of Statistical Learning for a start.
A: There is a classic paper (Wolpert, 1996) that discusses no-free-lunch theorem mentioned above. The paper can be found here. But according to the paper and most practitioners,  "there are [rarely]
a priori distinctions between learning algorithms." Note: I replaced "no" with "rarely".
Reference
Wolpert, D. H. (1996). The lack of a priori distinctions between learning algorithms. Neural computation, 8(7), 1341-1390.
