The Peninsular War was one of the longest and most drawn-out campaigns of the Napoleonic War; a piece of Imperial regime change designed to close off the last European ports open to British trade, which instead developed into the "Spanish Ulcer" that sapped the strength of Napoleon's empire and left him to fight a two-front war that would ultimately destroy him.
After 1808, Napoleon left the Peninsular conflict in the hands of his brother Joseph, and of the marshals and generals commanding the various French armies. No one man was given supreme command of all French forces in Spain, and French operations – though frequently successful on a local level, were marred by a lack of cooperation. This was made yet worse by Napoleon's own attempts to run the war by remote control from Paris, sending written orders that were out of date even before they were dispatched.
Though often defeated, and similarly bereft of central control for the early years of the war, the Spanish leaders kept on putting fresh armies into the field, while the civilian populace refused to surrender and fought a bloody guerrilla war against the invaders. This tied down a large part of the French forces, limiting the numbers available to pursue further conquests. As a result, once their initial occupying army had been driven out in 1808, the French were never able to conquer Portugal, which was defended by its own reorganized forces and by a growing British contingent. The British were led by Arthur Wellesley, a man of outstanding ability who would subsequently get the better of Napoleon himself at Waterloo. Although initially the French had the upper hand, the reorganization of the Portuguese army by Beresford and the construction of the Lines of Torres Vedras secured Portugal from French conquest. Thereafter, Portugal would become the base for the Anglo-Portuguese army that would eventually join with the Spanish to evict the French from the Peninsula.
Bonaparte's Peninsular War will take you through battles and campaigns focused in and around Portugal, but also branch out into Spain for some of the early war actions of 1809. The balance of the Peninsular conflict is covered in a follow-up title currently in development.