Cornerbacks and safeties in football have much in common. Both are members of the defensive secondary. Their primary role is to obstruct the opponent's passing game. Additionally, as members of the defense, they are responsible for tackling any ball carrier. But the two positions are not interchangeable, and often players will be a better fit for one over the other.
The Cornerback's Role
In most plays, a cornerback begins the play in pass coverage on a single receiver. If the cornerback's assignment is "man-to-man" coverage, the player will cover this receiver through the length of the play. If the cornerback is assigned "zone" coverage, the corner will cover a zone of the field rather than a specific receiver. On the vast majority of plays, a cornerback will start the play close to the line of scrimmage, usually directly in front of the receiver he is covering.
The Safety's Role
Most defenses designate a free safety and a strong safety. Strong safeties generally play closer to the line of scrimmage (usually alongside or just behind linebackers) and are key players in run support. Free safeties will generally play further back and, depending on the play, provide over-the-top insurance on long passing plays. Most will play a "zone" coverage role in the middle of the field. Strong safeties can also cover a receiver, though preferably it will be a tight end or running back, and not a swifter wide receiver.
Cornerbacks must above all else be fast, often at the expense of size, since most of his tackles will be on a single wide out receiver who is usually not much bigger than he is. A corner must be able to run backwards at high speeds and change directions quickly. Free safeties are able to sacrifice some speed for size and strength. Most are not expected to match a receiver step for step like a corner is, but they are expected to be able to tackle running backs and tight ends in the open field. Strong safeties are usually even larger since they are more likely to encounter blockers.
The Mental Side
Mental and personality differences can help distinguish which secondary position is best for a player. A cornerback is typically a coverage specialist with a highly focused psyche and the ability to react quickly. Cornerbacks frequently play a receiver one-on-one, or on an "island" away from the rest of the defense. They have to be mentally capable of handling that pressure. In contrast, safeties play in the middle of the field and some serve as captains who call plays and adjustments for the whole defense. Safeties must be able to see the whole field beyond their own personal assignment. For that reason, the safety is often called the quarterback of the defense.