One of the best ways to prevent pests is to keep your house and surrounding area as clean and tidy as you can. But, even if you do this, you're likely to be surprised by one or two bugs during your stay here:

If you have a lot of pests (or are unsure what is living in your house/apartment and where) in your house/room, sometimes the easiest way to deal with them is to bug bomb your room. There's a few different types of bug bombs - water based and smoke bombs are popular, but make sure to plan to be somewhere else for a few hours after you set it off. Also make sure to (eventually) come back and open your windows at least an hour or two before you plan on being in your house. Bug bombs come in various sizes, measured by tatami mats.
バルサン is a general dani/mites/cockroach bug bomb sold in home stores and kusuri shops.
キンチョール is a brand of general bug spray with a rooster as its mascot that works fairly decently for most bugs.

Mosquitos (カ) - Ka
Mosquitos are common in Japan, especially in rural areas near stagnant water (like drains or streams).
In Japan, You can buy mosquito repellent spray for your body and mosquito repellants for your house.
For details about purchasing mosquito related products, read this amazing guide: Mosquito repellent guide

For mosquito (and other bug) bites, you can ask your local drug store (any shop with くすり{kusuri} in its name) for 虫さされ (Mushi sasare). Relief ranges from liquid that you dab/brush/roll on to creams - the creams (supposedly) work better in the long run, but the liquid stuff offers instant cool relief.

Cockroaches (ごきぶり) - Gokiburi
Cockroaches are quite common, and it's likely you'll find one inside your house at some point.
You can buy a cockroach killing spray. Look for cans with pictures of cockroaches on them.
In addition to the spray, buying small little tablets called ごきぶりだんご (gokiburi dango) or the larger black roach repellents and sticking them all over your house is recommended. Don't forget to change these every 3-6 months (depending on how paranoid you feel).

Ants (アリ) - Ari
If you have ants, look around to see if there's anything that's attracting them in, and clean the area well. Look for sprays that say "ari" in them or have pictures of ants.
You can also buy small bait traps that will poison the ants. Place them outside your house, like around the veranda or genkan or near doors; they'll attract ants initially, then hopefully get rid of them.

Wasps/Bees - (はち) - hachi 
Wasps and bees aren't usually much of a problem in a regular apartment or house, but if you have an outer shed/building, wasp and bee infestation is possible.
The wasps and bees will build nests, and they will breed. So, if you notice a small nest, get rid of it quickly by spraying it with wasp killer. And trying to kill the wasp/bee.
You can buy it in home stores, usually the canisters are yellow and have a picture of a wasp on it.
If you are worried about doing this alone because of getting stung, wear protective clothes (thick layers, face mask etc.)

Mites/Bed Buds (だに) - Dani
Dani (ダニ)are little mites that live in tatami - especially old, moist, or damaged tatami (e.g. if you've spilt liquid on your tatami). These can be prevented by vacuuming and cleaning your tatami regularly with tatami wipes (sold at Daiso and other cleaning sections), but if you do have them, there are some things you can do.
First, vacuum your tatami.
Second, there's a pesticide specifically for killing dani. It comes in a can with a nozzle - sometimes blue - and a needle that you can insert into the tatami. It then sprays bug spray underneath your tatami.
Third, wash your sheets and air out your futon. Heat kills dani, so if you have an electric blanket, use the dani kill setting or hang your futon somewhere hot. Fourth, if your infestation is serious, or if you want to be extra sure to kill everything, use a bug bomb. Stores have dani-specific bug bombs that are usually yellow colored and water based, though the general ones will work too.

If the problem persists, you might want to talk to your supervisor or landlord about replacing your tatami, especially if it's old.
Check out Ishikawa's excellent guide to dani prevention as well as what to do if you have dani.
How to tell if you have 'dani':
With all the bugs in Japan, sometimes it's hard to tell what bug you got bitten by. But if you get bitten by dani, there are some characteristics to tell them apart:
1. You have several bites in a row. Like fleas, dani tend to move (and bite) in a line. So if you have bites that line up or are really close to each other, they might be dani.
2. The bites don't swell up, like how mosquito and spider bites tend to swell up and form a bump - dani bites don't tend to do this.
3. There are lots of them (especially close together).
4. The bites appear after you wake up/while you're sleeping in exposed areas like arms and legs.

Centipedes (ムカデ) - Mukade
Mukade are venomous centipedes which are common in Okayama. They're mostly active during the rainy season and summer, when they can easily find places that are warm and moist or damp.
Their bite can be fatal, but this is rare. If you are bitten, you should seek medical attention. It is unlikely to kill you, but you can easily get secondary infections. The bites are painful and swell extraordinarily.
If you want to be prepared and buy mukade killing sprays, look for the katakana "ムカデ" at the insect-repellant section of a homeware store. Often, they will have pictures of mukade on the sprays as well.
There are many ways to kill mukade. There are sprays that will kill it, sprays that will freeze it, and other sprays that will slow it down. Additionally, if you pour boiling water over it, that will kill it as well. Really really hot water also works, but boiling is best. For this, you definitely want to have a hot water pot on hand.
There is also a powder that you can put around your house that is supposed to act as a repellent that comes in a yellow bottle. When you use it, make sure to stand upwind of the powder and/or wear a mask, as the fumes from the repellent are quite strong.