The first thing is to realize that there are a lot of different ways to cook a burger.
Nothing beats a grill, or even comes close. But when living in an apartment or when it's too cold to grill, the next best thing is cast iron grill pan. Don't be fooled by the cheesy clam-style George Foreman wannabes.
How I do it:
There are a couple of ways.
First is on the stove top. Not my favorite way but it works:
Preheat your grill pan until it's smoking, usually medium high, or 7 on my electric stove (if it doesn't smoke, it's not hot enough). I use high-fat meat, usually 80% lean or, if I can find it, 73%. This adds to the flavor. Have a jar ready for excess grease. There's nothing worse then a fried burger.
Leave the pan oil-free. Brush the oil on the burger instead.
Sear the burgers about 1 min per side, then put in a plate.
Drain the oil out of your grill pan and return the pan to the stove, turning the burner down to medium.
Continue cooking 3 to 5 minutes per side depending on how well-done you like it.
The other method uses the oven:
Set your pan to medium high and sear the meat as described above
Preheat oven to 400 F (200 C).
After searing the meat, drain oil and return burgers to grill pan and place in the oven, cooking another 5 to 8 minutes.
Remember your cast iron pan will be really hot. Make sure you have oven mitts on. As always, like anything else, remove the burger from the pan ASAP as it will keep cooking in the pan.
These methods also work with any copper or stainless cookware that is oven-safe.
Do not try this with ordinary non-stick cookware. You will ruin the pan and make your house smell bad, or worse, start a fire.