Both. Here’s why:
Back in the day, people thought they should train on an empty stomach in order to burn more fat, but that has turned out to be false.
In fact, your body needs some glucose (blood sugar) for fuel in addition to what it can use from fat stores when working out. If you don’t have any blood sugar available, your body will eat its own muscle in order to convert them into glucose.
Low blood sugar will also make you tired and sluggish during your training session. For these reasons, I suggest you eat something 45 minutes to an hour before training: you’ll have more energy and endurance to work harder, burn more calories, and improve your muscle tone.
After training, during a period known as the golden hour (45 to 60 minutes after a workout), muscles absorb the most nutrients, and glycogen, an energy reserve in your muscles, is replaced the most efficiently. You don’t have to have a huge meal but you should eat something with both protein and carbs in it for best results.
Learn more about why so many people never stick to a diet (hint: it’s not what you think).