Timed interval sprints either on the road or on trainer. One old program I go back to every now and then is...
Warm up, 5-10mins
4 min paced effort (reasonable but sustainable pace)
1 min all out sprint (high spin, max power, almost puking)
repeat 2 more times (paced + sprint)
rest, easy spin 5-10mins
repeat 3 more pace + sprint intervals
Cool down, 5-10mins
Stretch.
You can adjust and how long you ride at medium pace and how long you ride at sprint, slowly increasing the spint time. While it's easy to keep track of time on the trainer, out on the road it's easier to set distance markers that roughly equate to my target times.
Squats, as mentioned, are also great for helping to improving sprinting.