If you want a really scientific answer: baking sucks the moisture out of the meat of the potato. As you may notice, potatoes are very moist inside and when baked that moisture evaporates creating a softer inside. Now if you wrap your potato in foil before putting it in the oven, it will lock the moisture in and make the skin soggy. Baking potatoes with no wrap will crisp the skin (potato skins!) and also cook the inside.
Hope that helped!