If you are targeted they can get the number of your contacts by using OSI or other methods. But in most cases it is just a coincidence that it looks like that that someone you know is calling. All that said, if the call is coming from your contact named uncle Joe and some guy with a strange accent saying they are calling from Microsoft, you will know it is a scam.
And how does a scammer get my contacts?
If you are targeted they can get the number of your contacts by using OSI or other methods. But in most cases it is just a coincidence that it looks like that that someone you know is calling. All that said, if the call is coming from your contact named uncle Joe and some guy with a strange accent saying they are calling from Microsoft, you will know it is a scam.