Sprints should be at full speed for 4-8 repetitions of 10-30 seconds each, for most people. It takes training for most people to sprint more than 30 seconds at a time, and even those who can do it are usually training for a specific purpose (400m race, or longer).
That's a total of between 40 seconds to 4 minutes of total sprint time, plus whatever rest you have in between.
Start with short sprints and build up. Do them outside, as treadmills can interfere with good running form and throw off your pace. Don't look at your watch. Run as hard as you can until you feel yourself slowing down. Slow down gradually. It might only be 5 seconds of running at top speed, but that's okay.