We know that the carboxylic acids are acidic in nature because of stabilisation (i.e., dispersal of negative charge) of carboxylate ion. So any factor which can enhance the dispersal of negative charge of the carboxylate ion will increase the acidity and vice versa. Thus electron-withdrawing substituents (like halogens, -NO2, C6H5, etc.) would disperse the negative charge and hence stabilise the carboxylate ion and thus increase acidity of the parent acid. On the other hand, electron-releasing substituents would increase the negative charge, destabilise the carboxylate ion and thus decrease acidity of the parent acid.
The substituent X withdraws electrons, stabilises the ion and hence increases acidity

The substituent Y release electrons, destabilises the ion and hence decreases acidity.

Now since alkyl groups are electron-releasing, their presence in the molecule will decrease the acidity. In general, greater the length of the alkyl chain, lower shall be the acidity of the acid. Thus formic acid (HCOOH), having no alkyl group, is about 10 times stronger than acetic acid (CH3COOH) which in turn is stronger than propanoic acid (CH3CH2COOH) and so on. Similarly, following order is observed in chloro acids.

Actually trichloroacetic acid is almost as strong acid as a mineral acid.