I've gotten a lot of varied advice from family, teachers, and friends. One that tends to crop up is 'write what you know'.
I really, really HATE 'write what you know'.
To some extent you should write what you know. I mean, if you've never had sex, you should probably stay away from writing an erotic novel. And that's fine. But you can't craft the whole book around 'what you know'. If that was the case, I wouldn't be writing anything, because nothing ever happens to me. (Now watch: something interesting is going to happen, like the TARDIS landing in my yard.)
I don't know, that piece of advice never did it for me. If I don't know it, I go on Google and research the bajeezus out of it until I do know it. Or I make stuff up.