Severe pain just under the R rib what is it?

I am in a lot of pain I can't move without pain it also feels like it is squashed by the rib and it very sensitive to touch. Any ideas?

There could be several causes here:

bruised ribs from a bang or strain

costochondritis - inflammation of the cartilage in the ribcage which can cause tremendous pain on the ribcage, breast tissue and around your back.  It can be caused by repeated strain on the ribcage or stress.

gastritis - inflammation of the stomach lining which can cause pain under the ribs, heartburn, back pain and pain in between the shoulder blades.  Certain foods can make it worse and stress can trigger it.  An endoscopy picks it up.