Here's one of the best videos out there on pushups. Follow the form and the progression. More than likely, you're just weak and your body is getting used to it. Obviously, see a doctor or physical therapist to diagnose any pain but more than likely it's form along with the usual beginners' issues. You just started out, your body's not used to it and it's going to take time to catch up. If you're working a desk job without much activity, you probably have rounded shoulders and a host of other issues as well. Look into Kelly Starrett's Becoming a Supple Leapoard.
Follow the video's progression I linked and build yourself up to doing more full form push ups. Pavel Tsatsouline has a thing called 'greasing the groove' where basically throughout the day you practice something like a pull up. You don't go to exhaustion but the idea is by doing it throughout the day with good form you're priming your nervous system to getting used to doing that. Good luck on your push up and hopefully even further physical development journey.