What happens if you name a character in a book but then someone already has the same name in real life but you don't know them - can you use their name?

Yes you can use the name.