Muscles are made of bundles of fibers. When you 'pull' a muscle you tear some of these fibers more than just normal exercise. Its gonna hurt fir awhile. You need to immibilize the muscle, take an NSAID like tylenol and ice it good. if it keeps hurting and severely effects your ability to function it may be a clasdified strain and for that you need to see a doc and get a brace or splint to immobilize the muscle.