The muscles groups used swimming are found throughout the human muscular system because swimming is one of only a few exercises which uses nearly every major muscle group in the entire body. Swimming also develops muscle strength, growth and endurance, and improves posture and flexibility. As an exercise swimming is considered low impact and does not put too much strain on your body joints and bones, which is why it is considered one of the best forms of rehabilitation exercise.
Generally all muscle groups used are swimming, however we also need to take into consideration that, different swimming strokes will isolate and work out different muscle groups harder.
The diagram below highlights which strokes work out which muscle groups.