Fetching details from the dictionary...

to persevere; to persist; to keep at it; to hang on; to hold out; to do one's best
to insist that; to stick to (one's opinion)
to remain in a place; to stick to one's post; to refuse to budge
試験に向けて頑張っている。
I'm working hard for the exam.
最後まで頑張りましょう。
Let's keep going until the end.
仕事を頑張ってください。
Please do your best at work.