A line was the portion of a play spoken by one person. It could also refer to a phrase one was supposed to say, or a variant thereof.
In 2285, while Leonard McCoy was drinking at a San Francisco bar, an alien greeted him by saying, "To your planet, welcome," to which McCoy drily replied, "I think that's my line, stranger." (Star Trek III: The Search for Spock)
Calling a phrase a line could sometimes suggest its insincerity or overuse. In 2365, while demonstrating romantic conversation to Wesley Crusher, using Guinan as his partner, William T. Riker suggested the phrase, "You are the most beautiful woman in the galaxy." Within the role play, he "admitted" to the El-Aurian that he didn't say it earlier because he was afraid she'd think it was a line. She said she might, and when he suggested she might believe he was leading her on, she replied, "There's nothing wrong with a line. It's like a knock on the door." (TNG: "The Dauphin") Later, he recalled this moment while infected with Surata IV microbes. (TNG: "Shades of Gray")
In 2376, B'Elanna Torres told Kelis, "You can't change somebody's way of life with a few lines of dialogue" after he expressed his desire to effect change in his culture by writing about things that happened on USS Voyager. (VOY: "Muse")