"It" in which sentence it is used For Tom we use he For Niana we use she
Assuming Tom is a male human and Niana is a female human, you must use the pronouns he and she to refer to them (or gender-neutral "singular they"). If they're dogs, "pet" fish, or whatever, you can optionally use it.
Examples such as boats and (European) nations being treated as female are potentially misleading, because most native speakers don't do this today (it's dated / poetic).
But if you've given something a (gender-specific) name, (even if you just affectionately named your car "Emma") you'd often maintain the anthropomorphism by saying things like She's being serviced by the local garage tomorrow.
We nearly always use it for inanimate gender-neutral referents, as well as for non-human living things where the gender isn't contextually relevant.