I'm looking to find an old science fiction story that I read in an anthology many years ago (probably in the 60s) called 'What Time Is It?'
The ISFDB lists four stories by that title, including stories by Isaac Asimov, Jack C. Haldeman, II, and Rita Lamb, but the one you're looking for is "What Time Is It?" by Richard M. Elam, Jr..
It's about a group of high-school or college age boys
Two high-school boys:
"A college engineering teacher's pay must be good these days," quipped Chuck Parker, as they walked up the winding flagstone path to the house.
Tom, who was tall with wavy blond hair, looked down on his shorter, freckle-faced companion. "A professor's pay couldn't afford this, Chuck. Dr. Haley's one of the outstanding scientists in the country. It's his great inventions in electronics that have brought him the extra cash."
"Wonder what he wants to see a couple of high-school goofs like us for?" Chuck muttered.
that hop into their professor's time machine
At his request. He was not planning to send the boys through time, he only wanted them to repair a defective switch, but they accidentally get it started:
It was a tight fit for the two of them. Tom handed Chuck a screw driver and showed him what he wanted. Chuck lifted the spring, but it popped back into his face. Chuck swung his arm back, startled.
And then it happened.
The boys' eyes suddenly became blurry, and they felt as though they were going down in a whirlpool. Their knees buckled, and they alternately felt terrible heat and icy cold. Then they blacked out . . .
and wind up in the past fighting Indians
Actually, their first stop was in the Pleistocene: sabertooths, glyptodons, etc. Their next stop they meet Indians:
"The ancient Canal Builders!" Tom said suddenly. "This is six or seven hundred years before our time. Some of the race's artifacts were recovered on the northwest corner of the campus last year—just about the spot where that village is!"
Our boys don't do any fighting, but they're in the middle of an Indian vs. Indian fight:
Down the slope the attackers plunged, obviously heading for the village. They appeared unaware of the cringing youths and their curious machine. In a moment Tom knew they would be on top of them.
He yanked the fear-paralyzed Chuck into the Traveler. An arrow from the village defenders skimmed so close to Tom he could see the turkey-feathered shaft. His hands trembling, he seized the lever and shoved it forward. Once again they were hurled into the stream of time. . .
and then hop into the future where all the cars are tear-drop shape.
The windows were huge long rectangles that were crystal clear. The boys decided that these must be a kind of Plexiglas. They looked out one of the windows and gasped at what they saw.
It was definitely the future. The air was full of low winking lights that turned out to be helicopters. It seemed as though nearly every family in the city must own one. There were a number of triple-decked highway trestles, completely lighted, over which sped teardrop-shaped automobiles.