Answer:
If you are inspired to write a play that is set in, let us say, Australia, but you have never been to Australia, you might very well want to go there in order to learn more about the subject of your intended play. It is also possible to just read a book about Australia, perhaps several books, or to just make things up. It depends upon how serious you are about your craft, as well as how much money you have available for travelling, which is not cheap. You also have the option of writing only about places which are already familiar to you, such as the city in which you presently live. That's the easy way.