The wifi that McDonald's uses is Yahoo! BB Mobile Point. The instructions are here, but I'll summarize in English.
Step 1: Go to a FamilyMart convenience store. They have a machine there called the Famiポート (FamiPort). Push the button that says "プリペイド"(Prepaid). It's a green button with the ￥ symbol on it.
Step 2: Push the button that says "インターネット電話/無線LAN"(Internet Telephone/Wifi). You'll see it has the Yahoo!BB logo inside.
Now it'll give you an option to either do this in English or Japanese.
Step 3: Select how much time you'd like to buy. There are three different lengths: 1 Day = ￥500, 2 Weeks = ￥1000, and 3 Months = ￥4000.
Step 4: After you select and confirm, it will print a receipt. Take that receipt and pay at the register. They will print out and give you your username and password info.
Step 5: Next you need to activate your username and password which strangely involves already needing Internet access. A mobile phone is fine. Follow the instructions on the form they gave you which involves going to http://www.bbmp.jp. Click on the link to validate your ID and agree to the terms. It should now automatically open your email program. Just send them a blank email to their address (firstname.lastname@example.org), or put SBTM in subject and body if you can't send blank emails. You should immediately receive a reply with a link. Click the link and input your Serial No. and Confirmation Code and submit. After that it should say you're successfully activated.
Step 6: Finally go to McDonald's with your computer, login to the "mobilepoint" network using the WEP key from your username and password sheet, open a web browser and put in your username and password. And you're done! Now study, enjoy your coffee, and try to take it easy on the fries.