Depends on what the problem is. did you check fuses yet? Do so, and if fuse if ok, the motor may have conked out. You will need to access the motor area of the sunroof by pulling back the headliner. then you may be able to free up the jamming problem or replace the motor.
By the sun roof switch where the interior light there's a cover. Open that cover (be careful not to brake it) and you should see like a screw, turn that screw with a flat screw driver and it should close!