When nonane-2,8-dione is treated with base, the product 1-(2-methylcyclopent-1-en-1-yl)ethan-1-one forms according to the following scheme: The arrow denotes the hydrogen that is first attacked by the base. But why does the reaction not take place like this? — Why is the arrow-marked hydrogen less acidic than the previous one?
The two protons are of similar pKa and you can get deprotonation at both sites with equal ease, however it is important to understand that most intramolecular aldol reactions are reversible and thus give rise to the thermodynamic product i.e. the most stable product. -ring formation is always preferred over -ring formation 1, 2. If you prepare the  product by other means, and subject it to the aldol conditions you will get the  product. The only exception to this is when you set up the reaction to be under kinetic control e.g. by using LDA, then you can get a mixture.
Maybe the hydrogen in the second case is the allylic carbon containing hydrogen, so it is more stable. More stable means less reactive, which indicates less acidic. Allylic carbon means sp2 carbon beside another carbon.