When I was living in the US, I had T-Mobile as a carrier. (Shout out to T-Mobile!) They have a plan for people who travel, where they’ve partnered up with a bunch of different service providers in a bunch of different countries to provide you with service. I don’t have experience with other phone carriers, so I’m not sure if any other phone company offers this as well. I used this both in Japan and when I visited Korea, and they have a website showing what countries you’ll automatically have service in.
This, of course, is the standard option that a lot of people go for. You pretty much go into any carrier’s store and choose a phone and minutes/data plan that suits your needs best. I can’t really help with which carrier is best because I didn’t do this, but each have their own benefits and pitfalls, so you’ll have to research that yourself unfortunately. The reason I didn’t go for this simple and straightforward answer is because it’s expensive. Like, really expensive. Like, you have to buy your phone upfront expensive. (And buying a $600 phone and not getting paid for two months hurts.)
You can try to convince a Japanese friend of yours to sign the contract in their name, but it’s still pretty expensive for a mediocre amount of data, and it’s a really big favor that you’d be asking of your friend.
3) Buying a Prepaid SIM Card
This is the route I ended up going on because my phone isn’t unlocked. I’d recommend this if you don’t have Internet included in your apartment, or if you want the option to connect multiple devices or people. I connect my phone to it as well as my laptop to it when I’m at work. I pay about 4,200 yen a month for unlimited data, which isn’t super cheap… But, the service I use, Asahi-net, always offer promos, so I’m on a 6 months free promotion right now. My referral code is  in case you want to go with this option. Plus, you could use an iPod touch or other device that can download apps, so you don’t really need a phone for this to work.
If you go with a data-only SIM card or pocket WiFi, you won’t have a phone number to go with your service… So, what I do is go through Skype. I bought a Japanese phone number through them, downloaded Skype onto my phone, and use that for my calling service. I don’t use it very often, so I bought the cheapest pack of credits (like $5) and I still haven’t used them all yet.The only problem you may encounter with this is that it gives you a prefix of +050 instead of the standard +81 of a Japanese phone number. This is to denote that it’s a online number. It’ll still fit in any online applications or whatever that you may fill in, but I’ve heard some places (like banks) are a bit wary about accepting these numbers because they can be used as the equivalent of burner phones. I personally haven’t had any problems with it in the numerous forms I’ve filled out or when I registered for a bank account, but I’ve read it happening online. So, it’s up to you!
This is similar to the prepaid SIM route, but you’d be going through a Japanese company rather than one that caters to foreigners. There are some advantages to this, such as getting your card for a fraction of the price, and having a Japanese phone number thrown in sometimes. But there are also a lot of disadvantages, like having to pay with a credit card (and generally you’d be using your credit card from home–unless you get a Japanese credit card–which can suck because exchanging yen is a bit of a pain), having to deal with a contract in Japanese, and getting denied because you’re foreign (which happens a lot at Bic Camera/Yodobashi Camera). If you go online and buy one, it makes things a bit easier, but I don’t have any recommendations for you unfortunately.
I am least familiar with this method, so I can’t provide too much information about it… However, I do personally know of at least two people who have gone with this route and really seem to like it, so it could be something worth looking into, especially if your language skills are pretty good!
I hope this helps you make a decision, or at least gives you a few more options to choose from! Let me know if you have any questions, or if you’ve found an even better method!