The quick answer to this question is: yes and no. Muscles strains are minute tears in the muscle tissue caused by misuse, or overuse. Muscle strain can cause pain and swelling as well as weakness in the injured muscle. In severe cases you may even lose mobility during the acute stage of the injury. If you don’t allow a muscle strain to heal properly, you will be more likely to reinjure that same muscle in the future.
Having said all that, whether or not you can continue to exercise with a muscle strain ultimately depends on the severity of the strain, which muscles are injured, and the type of exercise you wish to perform.