Turn off the gas supply to the furnace and let it cool down entirely. Never attempt any repair on a furnace that is still receiving fuel.
Inspect the furnace for any signs of rust or cracking. Use a flashlight to check the heat exchanger through the burner hole. If the exchanger has a crack in it, it needs immediate replacement, which should be left to a professional.
Thoroughly dust and sweep out the furnace components with a brush and dust rag. Spiderwebs sometimes cause combustion inside the furnace that can lead to flame roll-out. If the dirt and debris is removed soon enough, the furnace should resume normal operation. If the roll-out burned wires or other components, those elements need replacement as well before the furnace gets used safely.
Request professional inspection of the furnace before using it again normally. A malfunctioning furnace may appear to be working properly while pumping hazardous, odorless gases like carbon monoxide into the home. A professional can verify that the roll-out won't reoccur and that the furnace is safe for normal operation.