Don't wait until an injury crops up, swim smart, prevention is as always better than cure.
Make sure to talk to a qualified physio if you require treatment.
I didn't think you could get injured swimming?
First off, swim injuries are rare, much more so than in running as an example. Don't let injuries put you off. Swimming is often used as a component of rehabiliation programs for injuries from other sports.
What type of injuries can occur?
By far the most common type of injuries are those to the shoulder, notably the rotator cuff group of muscles. The shoulder is a complex ball and socket joint heavily used while swimming. The rotator cuff muscles are surprisingly small which makes them vulnerable.
Less common are injuries to the capsular ligaments of the knee which I won't go into here.
How do these injuries happen?
Repetition: Swimming involves repetetive movements of the body. In an average session an intermediate level swimmer can take up to 2400 strokes. Stroke mechanics put pressure on the shoulder while the arm is in an awkward position. An experienced club swimmer is used to this, someone learning to swim or improving is not.Address by: Be careful not to overtrain, listen to your body, always warm up and talk to club coaches about training load.
Hand entry: If your hand enters the water with thumbs first and at right angles to the water you are putting a lot of stress on your shoulders. A flatter hand entry greatly reduces the strain on the shoulder and gets the hand in position for a good catch. See diagram below.
Address by: Stalled entry drills, use a float and fins for these. Have somone watch you.
Crossing: The the hand enters the water on the opposite side of the centre line (lower image). Not only does this strain the shoulders, it also greatly increases your drag and slows you down.
Address by: Try aiming to stroke wider than normal, this will feel unusual but try it and have someone watch while you do it.
In addition, a straight arm pull places a lot of stress on the shoulder and should be avoided by always breaking at the elbow during the catch phase.