The details of those objectives remain a closely guarded secret. The X-37B program tends to attract public interest because of that secrecy: The Air Force does not share the locations of the X-37B planes while they're in orbit, although amateur astronomers have made a sport out of spotting the spacecraft with telescopes.
What is known is that the military is using the planes to develop reusable spaceflight technology. Officials don't necessarily want to reuse the same X-37B plane multiple times, but the Air Force designed the craft to try out new navigation systems as well as methods for reentering the Earth's atmosphere and for landing safely back on terra firma.
The spacecraft are also designed to carry out "experiments" that "can be returned to, and examined, on Earth" after the mission is over, according to Russell, the Air Force spokesman. The nature of those experiments are — you guessed it — also top secret.
Speculators have guessed the planes could be involved in spying activities or testing out a space weapon. There's plenty of precedent — in the US and abroad — for both types of projects. The current X-37B plane in orbit, called OTV-5, was launched to space in September 2017 on a SpaceX Falcon 9 rocket. The previous flight, for OTV-4, was 718 days long and ended in May 2017.
The first X-37B took off in April 2010 and returned to Earth about eight months later, totaling about 225 days in space. All of the planes were built for the US military by Boeing (BA). The financial terms of the contracts are unknown.