You’re just introducing a colony of lactose eating bacteria to milk and then cultivating them. They eat lactose and produce lactic acid. When this has happened to enough of the lactose, it thickens up and you have yogurt.
As someone else pointed out, you can strain it to produce greek yogurt. If you remove yet more wearer from it, you get something called labné.
You can eat labné with homemade pita bread and sliced grilled chicken, tomatoes, cucumbers and tahini.