Nationwide spots that are not preempted or bumped at the option of the local station (basically guaranteed to run) cost anywhere from $400 to $1,500+ for a 60 second commercial. That doesn't necessarily mean whoever is running the spot has to pay that cash out of pocket.
There are several ways to fund the cost of running TV commercials. One is simply pay cash. Another is giving the TV network a percentage of sales to pay for the airtime. Yet another option is to get an airtime financing company to finance the campaign and they get a percent of sales.