Shoulder Injury

Hello, I was at the swimming pool and my friends were joking and they grabbed my arm really hard out of the pool and my right shoulder got locked and hurted me af but I was too easy on it and it got unlocked but now I can’t move my arm, when I raise it lateraly it hurts me and when I raise it infront of me my shoulders get locked like there is a bone locking it, I really wanna hit the gym asap, what kind of injury is it? and how can I treat it asap?

Is dislocation treated fast? I mean after the doctor locates it back won’t I need to rest for a long time?

Oh man sorry I didn’t see your reply. Any luck with the shoulder?