If your teacher or your leader orders you to do sth or tells you sth, I always hear people say 'はい、わかりました。' But I also once heard somebody say 'わかる' instead of 'わかりました' to reply. Can people do that? Can I use both of them?
わかる (present form) is never used when you accept an order/request from anyone. It's used when referring to something you already know. Its politer equivalent is わかります. They are often used to show your sympathy.
- わかる。: I know. I understand that. You can say that. Yeah it really is.
- わかります。: (polite version of わかる) Yes. I know. I understand that. I agree.
わかった is the phrase you have to use when you accept someone's request. Its politer equivalent is わかりました.
- わかった。 Okay. Got it. I see. Understood.
- わかりました。: (polite version of わかった) Okay. I see. Understood. Yes sir.
You should almost always use the politer versions to your boss. You may occasionally see someone excitedly say わかる! to their boss at an izakaya restaurant, though.
So broadly and almost overall saying, you can not or should I say, you'd better refrain from using.
"わかりました" is, as you can see, is including 丁寧語｛ていねいご｝ ます、です、（ which is conjugated ) so that I think almost nobody would say "わかる", especially to your leader. If your teacher or leader is almost equal to your very close friend, then "わかる" would be possible. I think somebody who is so intimate with the teacher/leader would have said so.