1. To maintain a fragile balance between one extreme and another. i.e.: good and evil, sanity and insanity, decency and decadence, etc.
2. To behave; to abide by the the law and/or to abide by moral standards; to walk a straight path of decency by following the rules; to "walk the straight and narrow."
The latter definition is that applied in the song "Walk the Line" by Johnny Cash.
1. I walk the line between good and evil.
2. I used to be a drunken thug, but now I walk the line.