Above is a simple, generic picture representation of how much drug is in your bloodstream relative to time, courtesy of ScienceBasedMedicine.org. Going up or down on the graph is the drug concentration in your blood. Moving from left to right is time since you took the drug. When the concentration of the drug is in the area between the dotted lines, it is therapeutic and will be having an effect on you. The "T-max" is the time at with the drug reaches it's highest concentration, or "peak" as I described before. The duration of action is how long the blood concentration is in the therapeutic range and is still affecting you. If you compared Xanax to Ativan, Xanax would reach the peak much more to the left, and the curve would come down faster out of the therapeutic range since it's duration of action is less. Ativan would curve up much slower to reach the peak, and then the curve coming back down would be more flat and less steep since it's duration of action is longer. I know this was a long answer, but I really want to make sure you understand. :)
Because Ativan lasts longer, it is usually recommended for insomnia over Xanax. In fact, Ativan is approved by the FDA for sleep, whereas Xanax is not. That doesn't mean it can't be used for sleep, just that it's not recommended the first drug to try.
Don't be afraid of getting addicted to it. It's usually the people who are afraid of addiction and are cognizant of it, that are not prone to experience it.
I've spent quite a bit of time answering this for you, and if I've answered your questions to your liking, I would appreciate clicking accept. Thanks :)
Referenced graph: http://www.sciencebasedmedicine.org/index.php/generic-drugs-are-they-equivalent/