I believe the line is drawn at a point where there is clear intention to use an existing successful sci-fi environment to your advantage. Examples:
Case 1: Your novel has the title of 'My Star Treck' and the front picture is one of the enterprise starships travelling somewhere in space. Your story has nothing to do with the Star Treck universe though.
Case 2: Your novel has nothing to do as title or front picture with Star Treck but your story is clearly connected to the Star Treck fantasy world, prequel of something, sequel of something, parallel on something, where something a Star Treck actual large set of events e.g. a movie plot. Your story resides within Star Treck fantasy world, in other worlds.
I believe that in both the above scenarios you will have copyright problems. Those scenarios are extreme of course, but i think that are beyond doubt that if true, copyrights are involved.
Please keep in mind that i am unaware what happen about comedies; those may have a different set of rules that apply.
About words now, i believe that again they fall to the above statement. Clear intention to take advantage of an existing successful sci-fi world set the line.
Case 1: You copy the entire propulsion system of the Star Treck world. It just look 'scientific enough' for your story, it is the level you want to set to your fiction at.
Case 2: You name your main starship 'Enterprise' and make extensive use of the phrase 'beam me up Scottie!'.
I believe that case 1 is totally harmless while case 2 may raise copyright issues under certain circumstances. Why? This will be triggered after your novel succeeds. Nobody cares for some thousand copies. But if you sell millions that means that your story matters for people.
It is definitely not the propulsion system that talk to the heart of your readers and make your novel a best seller. If your success grows however and start negotiating all kind of rights, starting from movies and series to toys and stuff, then there would be certainly objection because the use of the starship name and a famous phrase alters the feelings of your readers even a little.
But at this point it is your novel that counts and the story you have to tell. Choose a meaningful for your story starship name and made up your phrases (readers will choose their favorite) will actually give more value to your story than simply get 'Enterprise' and 'beam me up Scottie'.
Finally, succeed with your story while using a copied propulsion system from an existing setting cannot trigger any copyright claims. Even if it does, the accuser has to prove your clear intention to take advantage of an existing successful franchise. So he has to explain why you did not 'borrow' something with greater trademark magnitude value, unless the propulsion system alone is as such: The unique element that the franchise you 'stole' from become so successful because of the ... propulsion system!