As some of the repliers have pointed out here, there are animals that are thought to have had a single, large horn in the middle of the forehead, such as the toxodont Trigodon or the rhinoceros Elasmotherium. There is another toxodont, Hoffstetterius, that has an even more pronounced base for a horn core. Kubanochoerus is an extinct pig that has a very pronounced projection of bone in the center of the skull. No one knows what it was used for. There is also an extinct bovid, Tsaidmotherium, that has an asymmetrical set of horns with one being placed close to the center of the skull near the forehead. Ironically it seems to be a member of the same group that includes one of the possible real-life inspirations for the unicorn, the chiru (Pantholops hodgsonii)
Many sets of plate armor for horses also have spikes set in the middle of the forehead, though whether that is for function or aesthetic purposes I do not know.
Chris Lavers goes into some details at to what a single horn in the middle of the forehead might be useful for in his book The Natural History of Unicorns. Similar to some other repliers here, he mentions that a single, straight horn in the middle of the forehead would be much better for spearing and thrusting than a typical bovid horn. However, he also provides some direct observations that support this. In some parts of Africa, the horns of cattle are artificially manipulated during growth for aesthetic purposes. Some calves have their horns manipulated so they point straight up through the middle of the forehead, rather than projecting out to the side. As adults, these bulls are oftentimes dominant in competing with other males over access to females because they can be much more aggressive in fights due to their forward-pointing horn structure, and they do seem to fight with a thrusting motion rather than locking horns.
I remember there was some suggestion that horns in the middle of the forehead were hard to develop because of how horn cores usually develop at the boundary between two bones or something. I think it was in the same book, but I am not sure. Notably in horned toxodonts and Elasmotherium the horn is thought to have been keratinous.
As people have pointed out, a horn in the center of the forehead would be much better suited for charging behavior because it is aligned with the spine. I'd like to add that a horn or plate in-like with the spine was one of the lines of evidence that led people to think that pachycephalosaurs butted heads, and while direct headbutting is controversial it is pretty clear they were using their heads to hit something. Plus a lot of animals often have large sinuses in the forehead region that can act as good shock absorbers when the horn makes contact.
A unicorn would almost certainly have a ridged horn. Those ridges in living horned animals aren't really used for anything but are the result of natural periodic growth due to the fact that the horn grows from the base continually throughout life (in contrast to deer antlers or pronghorn prongs which are shed annually). Mark Witton goes into some detail how this works here. The ridges don't usually prevent slipping. An horned ungulate usually doesn't want to get its horns stuck in a struggling predator, the purpose of the horn is to keep the predator away from its softer body by prodding it with the pointy end. They're not designed to kill in the same way that spears are.
The really gracile, ridgeless, spiral-shaped, white horn you see in a lot of unicorn depictions is clearly modelled after a narwhal tusk, which is a modified tooth. Narwhal tusk was often sold as unicorn horn in medevial Europe, though the actual legend likely draw more from Asiatic rhinoceroses and the chiru (which has close-set horns that can look like a single horn from a distance). A "real" unicorn almost certainly wouldn't look like a narwhal tusk, unless the horn was grown and shed annually like a deer antler (which have no covering). Otherwise it would probably be brownish or black (due to a keratin covering), ridged, non-spiraled, and possibly much more robust.
There is also the possibility that a unicorn doesn't just have horns, but tusks as well, and the horns and tusks are used for different tasks. There is a tendency in many ungulates to lose tusks when horns are developed (this is seen in ruminants, brontotheres, and rhinoceroses, among others) but there are exceptions. The Indian Rhinoceros mostly uses its tusks in fights between members of the same species and tends to use its horn for defense against predators, or so I've heard. Kubanochoerus and horned toxodonts also have both tusks and horns. A unicorn could use tusks or enlarged canines in social disputes, but then use the horn in a thrusting or jabbing motion against predators. The comparison would be like a lance or a spear compared to the shorter, more sword-like reach of a cow or goat horn. The horn may not be sticking straight up as in popular depictions, but angled forward so that the frontal, parietal, and nasal bones can form a better base of support. A really long horn would force predators to stay further back to avoid getting stabbed, so long as it's not so long that it interferes with feeding. Getting struck by the side of the horn probably wouldn't be fun either.