2006 chevy malibu classic

A small hose on top of the engine broke and shot oil all over inside of engine. The hose is about 6″-8″ long and goes from a “box” that looks like is is connected to air filter assembly to the valve cover gasket. questions: 1] what is it? 2] can I replace myself? 3] how likely is it that engine damage occurred?