Usually, the best and most effective way to hack a device is to do so from up close. However, there are ways o hack a device remotely. The most common methods involve sending some kind of virus or trojan to the target and phishing; Sending emails pretending to be from an official source asking people to give you private information like passwords etc.