The iPhone Simulator is included with Xcode 4 to allow iOS developers to test their software on the same Macintosh they use for programming. iOS apps are launched in the simulator by specifying it as the "run destination" before compiling the app from its source code in Xcode.
Launch Xcode, and open the project file for your application.
Video of the Day
Click on the "Scheme" menu in the toolbar to show the list of valid run destinations. This will show you the available simulator environments and any connected iOS devices that have been provisioned for development.
Select the iOS environment that matches the simulation environment you wish to test.
Choose "Run" from the Project menu to launch the simulator with your app running.
Xcode can only launch the simulator from a copy of the source code for an application. If you have received an .ipa file from a developer but do not have the source code, it is impossible to run this file on anything but an iOS device. Instead, to share apps in development between copies of Xcode, locate the runtime files in ~/Library/Application Support/iPhone Simulator/User/Applications/. These folders can be copied between Xcode installations to test the run destination on multiple Macs.