Right now Codea is the closest thing to what you want. You can write and run apps (inside Codea). You can even trade projects with other Codea users. What you can not do is create stand alone apps and run them on the iPad, all on the iPad.
Codea does offer a way to get your apps into the App Store; but you still need a Mac, XCode, and a developer license.
Two apps in the App Store that were written with Codea are Crabitron and Cargo-Bot.
Codea is based on Lua, a high level language similar to Java. It's focus is on physics modeling, but it can do just about anything.
There are a couple other apps that let you create code on the iPad (Java, PHP, Javascript, C), but they use a remote server to run the code. I don't remember the names of those apps off the top of my head.
Finally, there are web apps, the ugly step child of iOS. In theory all you need is a web server and an app like Diet Coda, and you could write anything you like for iOS; bypassing the App Store altogether. If you are not already a web developer, the learning curve for this is probably even steeper than XCode.