Rockets were used in warfare by the Chinese, who invented black powder, more than 2000 years ago. They were the first artillery pieces. Even after the invention of the canon, rockets continued to be used as artillery. In the Revolutionary War, the British attacked forts from the sea with rockets. In the War Between the States, rockets were used primarily as means of signaling, but some artillery rockets—very primitive ones—were used by both Union and Confederate troops.
It was not until WWII that rockets began to be used extensively in warfare. At first, they were used as air launched powered bombs to attack ground targets. Towards the end of the war, they became more powerful, and development began on air-to-air rockets for aerial combat.
Of course, the major advance in rocket use in WWII was Germany’s development of the V2, the world’s first ballistic missile.
But the V2 was not Germany’s only use of rockets. It also flew the world’s first rocket powered aircraft—the ME-163. This stubby fighter caused dismay within our bomber fleets. It would dive through them at nearly 500 mph, firing its canon continuously, and be gone before the crews could react.

click to enlarge
Fortunately, the rocket plane used most of its fuel on takeoff, and could make just one pass through a bomber formation before heading back to base for a gliding landing on a skid. But the concept would be resurrected for research craft when the U.S. began assaulting the sound barrier.