Here's how it breaks down:
* un-: a prefix meaning "not"
* doubt: the noun meaning "a feeling of uncertainty or lack of conviction"
* -ly: a suffix that turns an adjective into an adverb
Therefore, "undoubtedly" means "without a doubt" or "certainly".