If my kid needs to use the computer for school, how do I make sure he's not wasting time on other stuff?
First, make sure he's really "wasting" time. Kids can be pretty adept at multitasking, and what looks like wasting time might be a complex formula of managing music, homework, and socializing that doesn't negatively impact academics.
Discuss your concerns and talk about ways to structure homework time that work for everyone. Consider asking your kids to write down assignments and have them check each off as they finish them.
If your kid is really having a tough time blocking out distractions and staying focused, you might need some technical assistance. If your kid's school uses a 1:1 device program, ask the teacher if it comes with some time-management software or other controls that allow you to restrict access to non-homework-related sites. If your kid is using your home computer to do work, you might consider a parental-control program such as Skydog, OpenDNS, or KidsWatch that lets you separate homework from playtime.