The bacteria used in making yoghurt are Lactobacillus bacteria. Milk contains a sugar called lactose. The bacteria are able to break this down to form lactic acid. The lactic acid both lowers the pH of the yoghurt, which to preserve it, and helps denatures milk proteins, which gives the yoghurt its sharp taste.