what causes sudden muscle and joint pain?

My legs have been hurting a lot. Sometimes pain moves to my arms. The back of both legs hurt badly. Pain moves around.