It won't be difficult to make a purchase if you know when and where you want to go. Most of the people, that sell train tickets in Japan speak some English, but if you want to make the process smoother and faster, I would advise you to use Japanese.
A JR (Japan Railway) train at Osaka Station（大阪駅）
Let's suppose that you're going to Kobe from Osaka. The distance is approximately 30 km and it takes about 20 minutes on the JR (Japan Railways) line. The good thing is that Japanese trains are very punctual and fast.
Transportation signs in Japan are usually written by using hiragana, kanji and romaji
Before boarding the train you're required to buy your ticket in advance in a ticket booth. Usually there's a ticket gate before entering the platform where you need to validate your ticket, maybe your pass or swipe your card. In case you are confident in reading Japanese, then I recommend you to buy tickets from the machines. By doing so you don't have to line up. In addition the most convenient way is probably to buy a transportation card and just load some money on it.
In the following dialogue I will use katakana and hiragana. If you are not familiar with these characters, then I highly recommend you to go through some tests on my side. The first step of learning Japanese is mastering these two alphabets which are essential, to learn the rest. There's one more thing that I want to note here.
It is advised to use Japanese when buying tickets in Japan
You are basically a God when you're buying tickets or using any kind of service in Japan. This is not an exaggeration. I hear many times from Japanese people that ”お客様は神様です”, which basically means that a customer is a God. As a result, you as a customer are not required to use any form of polite Japanese.
On the other hand the personnel who is serving you must use the most polite phrases. If this doesn't happen she or he might get fired very quickly. For the first time I found it very weird, that asked something in a very short way and the answer was two or three times longer. Well, at least it becomes clear for you that you are a customer and you're not providing service.
All right after the short introduction let's see the dialogue:
I think the length of the sentences depending on the position of the speaker is clear. As a customer you don't really have to pay attention to too many things. The most important is that you tell the essential information that is required for the process to proceed. In the same time though, similarly to English you can use slightly different expressions when for example requesting something. So let's see the case when you ask for the ticket.
There are other ways to say this:
All of the sentences above mean “one ticket please”, but their emotional content is a little bit different. My personal experience is that females especially young girls tend to use longer phrases, whereas old men like to use shorter, less polite expressions. I would like to emphasize it here once more, that as a customer you are not required to use polite Japanese.