Japanese curry belongs to the group of typically Japanese foods that have origins in European cuisine, called yohshoku . Curry is tremendously popular in Japan - it's on the menu at just about every 'family' restaurant and department store restaurants, and there are curry-only restaurants as well as ones that specialize in high class yohshoku in general.
Japanese curry, called curry rice (or kareh raisu) since it's always served with rice, is not much like the curries from India, Thai or other places with better known curries around the world. The best way to describe it is probably to say it's like a English style stew with curry. (It's not at all like the curries you get in modern Britain, which are firmly in the Indian or Pakistani curry families.)
If you've ever been to a Japanese grocery store, you've probably seen the blocks or bags of curry base taking up an inordinate amount of shelf space. Competition amongst curry base makers in Japan is fierce. The bases are pretty convenient to use, but these days I use them less and less, since I discovered that making curry properly from scratch is not that much more effort than making curry with a readymade curry base. Commercial curry bases contain things like sugar or corn syrup as ingredients, plus some of them use mystery fats (always check the ingredient lists). I add sweetness just via the vegetables, especially a huge mound of slowly sautéed onions.
Either way, to get the most flavorful curry takes a long time. This is definitely a slow-cook meal.
This recipe for beef curry can be adapted to other kinds of meat, or to vegetarian options too. I've included instructions for using a store bought curry base as well as making your own curry roux base.
Makes about 6 to 8 servings.
For the curry roux:
To serve with:
Special equipment recommended: a heavy-bottomed enamelled cast iron pot (Le Creuset etc.) (but any decently heavy pot will do. A thin walled pot leads to burned curry. Burned curry ranks near the top of things that are Not Nice.)
If the meat is in one big chunk, cut into cubes about 2 cm / 1 inch square. Pat dry with paper towels, and brown in a little oil on all sides in a frying pan. Set aside.
Slice the onions thinly. Grate the ginger and either grate or finely chop the garlic. (A microplane is great for this task, if you have one.) Peel and cut the carrots into chunks. Don't peel the potatoes yet: this will come later.
Heat your heavy-bottomed pot over medium heat, and heat up some butter, ghee or oil. (Butter or ghee will add some richness but oil is fine - you will barely notice the subtle difference since the curry will overwhelm it.) Add the onions and a pinch of salt, and lower the heat to medium-low. Now comes a period of long, slow cooking of the onions that can take up to an hour or so (the salt helps it along as it extracts the moisture in the onions). At the end you want to end up with a much reduced mass of onion that is a light caramel brown in color, as in the photo.
Once the onions have reached this stage, add the ginger and garlic and cook a few more minutes. Add the canned tomato and 6 cups of water, the browned beef, the stock cube, the bay leaf and the star anise. (If you are particular you can put these in a bit of cheese cloth or a tea ball for easy extraction later.)
Peel and grate the apple and stir in. (This is optional, but adds to the depth of flavor.)
Bring up to a boil, then lower the heat and simmer for at least 1 hour, or more if your meat is a bit tough.
About 30 minutes into the cooking process, dry-roast about a tablespoon of garam masala powder in a small frying pan until it starts to get very fragant, and add to the stew pot. Add the carrots around then too.
Add the flour, and cook the mixture over medium-low heat, stirring constantly, until it becomes a light brown in color. (See these very detailed instructions for roux  if you aren't sure.)
Take the pan off the heat, and add the curry powder (the more the hotter.) Stir until the whole kitchen and beyond smells like curry. Set aside.
When the meat is about as tender as you want, peel the potatoes, cut them into chunks and add to the curry. Continue simmering until the potatoes are tender.
Take the pot off the heat and fish out the bay leaf and star anise. Stir in the roux carefully until it's completely melted into the stew and the liquid is thick and very brown. Return to the heat and simmer a few more minutes.
At this stage you can dry roast another tablespoonful or so of garam masala and add it to the curry.
At the last minute, add the optional frozen green peas, and stir - they should cook almost instantaneously. Serve immediately.
There are two ways of serving curry in the "yohshoku restaurant" way. One is to put the curry in a sauce boat, and serve the rice separately. The other is to put the rice on the plate, and cover just one half with curry, You can of course just pour the curry right on the mound of rice.
Usual garnishes are fukijin zuke, a sweet mixture of mystery pickled vegetables, and rakkyou, small pickled shallots. Other garnishes include chutney and grated cheese.
I don't go to the trouble of grinding my own curry and garam masala, much as I'd like to in theory. I use pre-ground powders bought at a store that caters to Indian and Sri Lankan expats. The most common Japanese brand of curry powder is S & B, but the Indian kind is quite a bit cheaper and just as good quality. Garam masala is not commonly sold in Japanese groceries anyway, but it is of course in Indian groceries.
Update: I have written up the Japanese curry powder formula  for people who would like to experiment with mixing their own. (Includes a recipe for garam masala too.)
If you want it to be yellower, add some turmeric. If you want it hotter, add some chili pepper powder, or more curry powder.
Instead of, or in addition to, the grated apple, you can add some chutney , a tablespoon or so of honey, Worcestershire sauce, ketchup, and even a bit of soy sauce or miso.
If you are using a curry base instead of making your own curry roux, just add it in exactly the same way near the end of the cooking process, making sure to take the pot off the heat first. If you have the block that looks like a chocolate bar type, break it up into smaller chunks and stir in to the stew mix until all is melted. The bagged powder type melts in faster. The curry should not be stewed for a very lengthy time after adding the base or spices or the flavors will dissipate somewhat.
Many Japanese housewives individualize their curries by combining two or more commercial bases.
Pork curry is made in the same way as beef curry, but you may want to try making the curry a bit hotter (by adding more curry powder or chili pepper powder).
Chicken curry is best made with the dark meat parts (thigh works great). I also prefer to take the skin off first - curry-stewed chicken skin is not that nice. The stewing time for chicken curry is shorter since you don't want the chicken to get dried out.
If this all sounds like too much work, you can still make a quick and easy curry using ground beef or other ground meat, and a commercial curry base. (Commercial curry base blocks are so big because they have a ton of flavor enhancing ingredients in them already.) Adam Kuban has posted a quick and fairly easy  method for making a curry this way, though I would recommend sautéeing the onions a bit longer than he does, and adding the potatoes somewhat later in the process.
If you are in a huge curry..I mean hurry, you can buy readymade curry in a pouch. They vary quite a lot in quality so try some until you find a brand you like.
You can omit the meat and use oil instead of butter or ghee, and have a vegetarian curry. If you want some protein, try a can of chickpeas. Cooked soy beans also fit very well. You can go the TVP - quorn route if you like too. Or go for an all-vegetable curry and add more carrots, or some sliced eggplant (aubergine), cubed turnip, etc.
Curry freezes and reheats very well, as long as you leave out the potatoes. Frozen potato turns into a mealy, watery, inedible mush. Just add some boiled potatoes to the reheated curry. Since it does take a long time to cook it does make sense to make a big batch at a time and freeze extra for quick meals in the future.