One way to do this is to see if an app called "Cydia" exists. If it does, the phone is jailbroken. You can search for Cydia using the search bar (Spotlight), or you can just look for it by searching through the iPhone manually. There are ways to jailbreak iPhones without including Cydia, but the likelihood that a jailbroken phone has Cydia is very high. This would be the easiest way for a casual user to detect if their iPhone has been jailbroken.
Cydia can be hidden however, as is pointed out in the comment below, so the method above isn't fool proof. The best way to PREVENT a device from being jailbroken is to keep it updated. The latest jailbreaks can be found on www.redmondpie.com and on www.reddit.com/r/jailbreak/, so you'll know whether or not it is possible to jailbreak your phone. You'll find the latest jailbreaks tied to certain iOS firmwares, so if your phone is always up to date, the chance of your phone being jailbroken is almost zero.
If a device has been jailbroken, its complete file system can be accessed. There are file explorers that work on jailbroken devices but not on non-jailbroken devices and can be used to determine if your device is jailbroken or not. If you can explore the files on your phone with one of these file explorers, then it's jailbroken. iFunBox is one of these file explorers. Download iFunBox, which is free, plug your phone into the computer, and see if you can access the file system. If you can't, it's not jailbroken.