Bulgarians and Hungarians actually have very different histories. Neither one of them really could be said to have ever been Turks1, although they may have borrowed some things from Medieval Turkic-speakers.
The current Wikipedia entry diplomatically lists 3 cultural ancestral components for Bulgarians:
- Thracian citizens left over from the time that area was under the control of the Byzantine empire.
- The Bulgars, a semi-nomadic Turkish people who started to move into the area in the mid-7th century.
- Early Slavs, who moved into the cultivatable land that the nomadic Turks depopulated in the Balkans around this time.
However, its pretty easy to see which culture was the dominant one, and which two just had some stuff borrowed from them, by the language. The first Bulgarian Empire in the late 7th Century, used the local Turkish Bulgar as its official language (along with Greek), but by the late 9th switched to the Slavic Old Bulgarian, the direct ancestor to modern Bulgarian. So clearly here the Slavic cultural component won out.
The history here is slightly similar, but with different sets of people and perhaps a bit more interesting. During most of the Medieval period, people speaking Finno-ugaric languages and practicing low-density pastoral techniques like reindeer herding likely ranged everywhere in northern Europe that was too cold for traditional agricultural activity or for the Altaic's horse-based pastoralisim.
Here's a map of the modern distribution of this language family:
The green outlying area in the Balkans is of course the Hungarians.
What appears to have happened was that this one group of Finno-Ugric speakers sometime around the first Century picked up pastoralisim from their neighbors2. This is a very large cultural package, but for some reason they kept enough of their identity to keep their language. They first became known to history as the Magyars, the furthest west of the eurasian pastoralists in the mid 9th century.
There happens to be one good large area of pasture in eastern Europe, the Alföld in modern Hungary. This made this area a very tempting target for pastoralists throughout the Middle Ages. The Magyars just happened to be the last Eurasian pastoralists to conquer it and hang onto it long enough to put down roots. Magyar today is known as an alternate name for the Hungarian language, as well as the ethnic group that primarily speaks it.
1 - This answer got merged from another question that was also asking about Hungarians and Turks, which is why there's a lot of content in it about those two peoples as well. I've left that material in, because I think its still interesting, if perhaps now a bit off-topic
2 - Yes, these unnamed example people could well have been Turkic speakers. However, given the geography and timing, Indo-Europeans like the Iranians or perhaps even the Germanic Ostrogoths are much more likely. Another remote possibility is the Huns (whoever they were).