Unfortunately your question is too vague to answer in depth. Trademarks are governed based on laws that originate from countries, so what is legal in one country may not be legal in another. As a general rule, Trademarks cannot be copied. So if you want to name your game "Star Trek 2" for example, you will probably get a lawsuit. If you want to name an object in your game "Shields" then you are safe, even though Star Trek uses the same name, because "Shields" is a description based name and cannot be copyrighted, for the most part. To share an example, I use a Music Creation Utility Called "FL Studios". Before they changed their name, it used to be called "Fruity Loops". They were sued by Kellogg's because their cereal "Fruit Loops" is trade marked, and so they had to change the name to FL Studios. Ultimately
Another example would be "Levi's" and "Wrangler". Both companies produce "Jeans" and both companies can use the term "Jeans" to describe their product, because it is a descriptive term that cannot be copyrighted. So if your best betspell is to talk tonamed "Fire Ball" or "Lightning Strike" multiple people can use it because it is description based. But if it is a lawyerspecific name and not descriptive, you could be liable for using it.