this sounds like something I can answer.. mostly
1:What do the vacuum lines do?
well, johnny... engine creates vacuum (basically an air pump, it sucks in air, creating vacuum because less molecules occupy a space, causing lower pressure, and moecules from a more dense area want to move to the lower density area)
the vacuum lines are used to "transport" or use this vacuum force to operate various sensors, actuators, and basically to suck things into the engine.
2:What problems can they eliminate?
Replacing leaky vacuum lines can have numerous effects.
Lets look at what relies on vacuum:
Fuel Pressure Regulator
Map Sensor
Cruise Control
Wastegate
Charcoal canister
Exhaust Gas Recirculation
AC/Heater ducting doors.
Brake Booster
Problems relating to any of these things working incorrectly should always be investigated by checking the vac lines. A failing vac line could cause one or several of the above mentioned things to fail/become unrelyable. Almost all of them could directly effect several aspects of how a motor runs/idles/boosts/knocks, not to mention the non critical accessories.
3:And also what is the best kind of hose to use for when you change the vacuum lines?
Rubber from autozone/discount will work just fine. A better replacement would be a silicone vac hose. Inside Diameter of the hoses is a concern when your working with vacuum. It will effect the amount of force and speed of the force transmitted.