iOS ships with a basic compass that you can use to find your basic heading when driving or hiking. It's not as robust as some third-party orienteering apps, but it will work in a pinch when these other apps are not available.
When you launch the compass, you may be required to calibrate it by tilting your iPhone until you fill in a circle. This tilting circle is new to iOS 7 and differs from the figure 8 calibration in iOS 6 and earlier versions.
Once calibration is done, the compass will show you magnetic north by default, but you can switch to true north by going to Settings > Compass and turning on the toggle for "True North". That long, bold white line is your compass needle and shows you the current direction that you are facing in degrees and direction (77°E, for example). As an added bonus, the compass uses location services and will pull down your city, state and exact GPS coordinates.
The four major directions (N,S,E,W) are clearly labeled on the compass face. If you want to find north, hold your phone level in your hand and slowly turn yourself until your white compass needle matches up with N and its red arrow. You can do the same with all the major directions by turning with your phone in your hand until the compass needle aligns with your intended direction.
If you know the direction that you need to walk (15°N, for example), you can lineup the compass needle to that heading and then tap on the compass face to lock it. The heading will be bolded and highlighted with a short white line on the compass face. As you walk around, the compass will track your direction and will draw a red arc on the inside of the compass dial that shows you how far you are deviating from your intended target. When you are done, just tap on the compass face and your heading point will be removed.
The compass app does not include standard compass features like orienteering lines and a direction of travel arrow for use with a map, but the compass does link to Apple Maps and you can use that in a pinch to navigate. Just tap on the GPS coordinates in the Compass app to launch Maps. You then can tap the navigation icon in the bottom left until you turn on compass mode, which will orient the map with magnetic north. Once you know where north is on the map, you can find your target on the map and guesstimate your direction of travel.
This is only a tool that should be used as last resort or for fun. As Apple points out, "the accuracy of the compass can be affected by magnetic or environmental interference; even the magnets in the iPhone earbuds can cause a deviation. Use the digital compass only for basic navigation assistance. Don't rely on it to determine precise location, proximity, distance, or direction."