Apple - How do I AirPlay mirror my iPhone screen to my MacBook Pro?
If your devices have OS X Yosemite and iOS 8 or anything newer, there's a built-in way to do this via a wired connection.
Quit QuickTime on your Mac if it is open.
Connect your iPhone, iPad or iPod touch to your Mac via a Lightning or USB-C Cable.
Open QuickTime on your Mac, and select File > New Movie Recording.
A recording window will appear. Click the arrow next to the Record button, and select your iPhone from the dropdown menu that appears.
Click the Record button and go about your business on your iPhone.
Once you're done, click the Stop button and save the video.
An app which works great for me is Reflector. Its not free, but there is an unrestricted 7-day trial for you to experiment with. You can use the free Quicktime Player on your Mac to record a video of the screen (or a selected portion thereof) of the iDevice, once Reflector is displaying it on the screen.
I use this combination all the time.
You can do as others have suggested and download another piece of (paid) software for your Mac, or simply hang tight until iOS 8 and OS X Yosemite come out, at which point (assuming Apple maintains the feature) the QuickTime Screen Recording function will work on an iOS 8 device connected to the computer via USB. In addition, a service called iRec should allow you to do what you want (without the use of a computer) once it is released later this year.