Arthur C. Clark is quoted as saying, “Any sufficiently advanced technology is indistinguishable from magic.” This axiom is something speculative fiction writers love to work with. Today, we have technology and devices that would appear magical to someone even fifty years ago. (Want proof? Consider handing a smartphone from today to an average adult in 1970 (complete with the internet and whatnot we enjoy today). What would they say about it? Then consider someone from 1690, 1750, 1870, and even 1920. This would easily look like magic to them. All of them (though the person from 1920 might be willing to buy it as technology). After the 1920s, common people would likely start saying that it’s science even if they can’t explain exactly how it works. I would venture to say that most people can’t explain how the modern cell phone works today, even though they know it’s not magic.
This is where sci-fi comes in. When you’re writing, you don’t really need to explain everything. This is a trap I’m way too familiar with, to be quite honest. I sometimes get stuck trying to scientifically explain things that, frankly, should just work. (Or, as people in certain industries like to say, “It works by P. F. M.”) That said, you should create “rules” that your magic technology works by. For example, if you’re using faster-than-light travel, establish rules like how long it takes to go a certain distance and how long it may take between coming out of and going back into faster-than-light. The same goes for weapons and other kinds of technology, weapons, etc.