I think it means the former, in the sense of holding either an opinion or a military location.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
It can mean both, and also I think it means that while you're standing where you are and not going anywhere you're also maintaining your current state of readiness.
In the case of a job, I think it just means "this is the job you have" though it could use the above thought to mean you are trying to keep your job.
If someone were to ask: "What position do you hold?" They could be asking what you do.
"hold your position" would likely mean to stay put and not move.