I set my oven to 400 °F (about 200 °C) and moved the rack to the middle. Meanwhile, I grease my baking dish lightly so nothing sticks.
I bring a large pot of salted water to a boil. Then I cook the penne for ~10 minutes — slightly undercooked — so it won’t turn to mush in the oven.
While pasta is cooking, I heat olive oil in a skillet over medium-high. I add ground beef and onion, breaking the meat up. After about 8–10 minutes, I add garlic and cook until fragrant. I drain excess fat if needed.
I pour in the marinara sauce, stir it in, and let it heat through. I taste and season with salt and pepper as needed. The sauce and meat become a cohesive mixture.
I drain the pasta and place it in the baking dish. Then I pour the beef mixture over and gently toss to coat. I spread the cheese over top in an even layer. Then bake uncovered for about 10 minutes until the cheese is melted. Optionally, I broil for a few minutes to brown the top.
After baking, I let it sit for 5 minutes so it sets and is easier to slice. Then I serve straight from the dish.