You'll want to take a look at Apple's UINavigationController Class Reference.
Specifically, the below item:
- (UIViewController *)popViewControllerAnimated:(BOOL)animated
This can be used from any view within a view to get your desired outcome. It's important to note the difference between "push" and "pop" with regards to the UINavigationController hierarchy. To add a view, you push it to the stack. To remove it, you pop it off the stack.