1998 Subaru Forester

My Forester is slow in responding to accelerator pedal. It seems gutless and I’m not getting a lot of power. My motor is hesitating at times and it feels as though it skips when cruising along. My check engine light is on. What can I do to get better performance and more power from my Subaru engine? Also, how can I get the check engine light to turn off?