How to record while on an app?

Like If i want to record me playing a game or me in notes, how can I do that? I have an iPhone 3 btw. Do I need an app? Tell me apps I can use, any solutions.

There's no way for an iPhone 3, only for an iPhone/iPod/iPad with iOS 6 (no higher, no lower). It is a 3rd party application (which means apple has not approved it, although it still works). Here is the download link, its free download and you just open this link on your apple device and hit install for RecordMyScreen.
http://emu4ios.net/

If you want to jailbreak your device, there are screen recording apps on the cydia store. Hope i helped!