Please be a bit more specific about what you want to do. What do you mean by "insert" exactly? Do you need the line to go in a specific place? And if so, how can you specify that location? And what kind of text does the file contain, exactly? In other words, what should the before and after files look like?
In particular, sed has two commands, i
, for insert and append. These are used with address spaces for adding text before or after a line containing a targeted pattern.
sed '/sometext/i insert this line before sometext' file
sed '/sometext/a insert this line after sometext' file
If you want to insert text into the middle of a line, you need to use the standard s///
Three pages with useful info on sed: