Let's take a step back.
First off, yes, every device on the internet has an IP address. That's the basic foundational building block of the internet.
Most of the time, people don't even know (nor need to know) what their IP address is, and that's OK.
There are cases, though, where it's useful to know (often in troubleshooting situations), and there are tools available on just about every platform that will scan the local network (i.e. your home network) and give a list of devices that can be 'seen'.
This, in total, amounts to "hey, I can see 20 devices on the network!" This does not constitute hacking.
A skilled network administrator (and some smart software) can make intelligent guesses as to what the devices are - "Hey! I think the device at 192.168.1.123 is a Mac, and 192.168.1.125 is an iPhone!!". This also does not constitute hacking.
Knowing the IP address of a device on the network - even if you know what that device is (Mac, iPhone, smartTV, doorbell, whatever) doesn't give the user any access to the device itself.
Now, there are cases of bugs in software that can - under very specific conditions - bypass normal access controls and give a malicious user access to systems they wouldn't normally get. For example, if you have a SmartTV, there may be cases where a hacker can trip up the TV and force it to change channel or some such. Technically, this is hacking - gaining unauthorized access to a device to manipulate it in some way.
There are very few known ways to hack modern systems such as iPhones. There are none that are known to work just by sending malicious traffic over the network. Most require physical access to the device.
So, the question that remains is what makes you think you've been hacked? What specific symptoms or actions have occurred that make you think this?
If you've gotten law enforcement involved, they're going to want to know the same thing. They can't and won't take action unless you have some evidence of someone hacking you.
If it's someone on your network that somehow "knows" your IP address then they're nothing more than a kiddie scripter and you should ignore them.
If it's a friend that's just pranking you... well... find new friends.
Nowadays, it's far more likely that some online account you use has been compromised - maybe you used a weak password on some site (or, even worse, use the same password on every site). Maybe some site you access got compromised and leaked user data, and somehow this 'hacker' has gotten hold of your credentials through that leak. These may be legitimate concerns (and why many sites are turning to 2-Factor authentication, so they no longer rely on a single password for authentication). But a compromised online account won't be affected by you getting a new phone, or even changing OSes (Android -> iOS, for example).