/u/jku1m
Formally speaking, Charles V was the one and only monarch who held both the kingship of the crowns of Spain (comprising of Castile, Aragon, and Navarre) and the emperorship of the Holy Roman Empire (HRE). As I wrote here, both of these domains had their own sets of complications, challenges, and resistance to the rule of Charles. This led to Charles' inability to retain the entire inheritance for his son Philip II of Spain, and over time this led to divergence in policy between the two sides of the House of Habsburg.
The start of Charles V's reign
it was recognized from the beginning that to have Charles as both King of Spain and Emperor of the HRE may not be practical. His grandfather Maximilian, having failed in his attempt to reform the HRE for easier governance. In fact, at some point Maximilian had made up his mind to split the inheritance between Charles and his younger brother Ferdinand: Charles was to be HRE emperor, having been raised in the Burgundian Netherlands, and Ferdinand was to be King of Spain, having been raised in Spain. At the 11th hour, Charles' mentors and tutors convinced Maximilian to change his mind and concentrate the inheritance in the hands of Charles.
At the beginning of his reign in Spain, Charles had to face the revolt of the Comuneros in Castile. His Burgundian background and entourage failed to endear themselves to Castile, something they were keenly aware of, which led to them moving Ferdinand out of Spain and into Germany.
At the same time, he insisted that Castile pay for bribes to ensure his election to HRE emperorship. As soon as he departed for Germany, revolt broke out. This is the background as he approached the famous meeting with Martin Luther at the Diet of Worms of 1521. He was a weak emperor with little money, no troops, and no history of winsome ways yet.
The peak of Charles V's reputation
Fortunately for Charles, he was soon able to build a credible army in Germany. The Battle of Pavia in 1525, where Spanish-Imperial soldiers were able to defeat and capture the army of, and the King of France. This was followed by the Conquest of Tunis in 1534, strengthening his security in the Mediterranean. And in Germany, he was able to defeat the Protestant Schmalkaldic League in 1546.
All of the above -- an incomplete list of his victories -- were impressive. But at the same time they expose his weaknesses. Financially, he continued to depend on Spanish revenue and Nederlandish financiers. In Spain, he could rely on the humbling of the nobles and cities who lost the revolt of the Comuneros. But in the Low Countries, he tended to give further privileges in exchange for cash.
In Germany, he failed to reform its imperial financial system, and had to rely on financiers such as the Fuggers, Taxis, Dorias, Spinolas. At the same time, he failed to solve the Reformation issue, nor address the looming Ottoman threat from the east. In the former, his insistence on political unity at the cost of theological compromise was unacceptable to the hardline Catholics. In the latter, this led to an unhappy sequence of settlements which later became the Peace of Augsburg.
The settlement
All those weaknesses had started to pull his empire apart by the time of the disastrous invasion of Algiers in 1541. In Germany, his brother Ferdinand was put in charge of governance in his absence.
At the start of Ferdinand's reign, he didn't have much in terms of personal dominion. So in 1521 Charles made him Archduke of Austria to give him more authority in the eyes of his (or their) German subjects. However, in 1526 he unexpectedly became King of Bohemia and Hungary with the death of his brother-in-law in the Battle of Mohacs, without issue. This means he inherited lands that were contested by, and under attacks from, the Ottomans. This was also the first time a Habsburg was nominally the Holy Roman Emperor while also King of his own personal dominions; previously they were merely Archdukes of Austria and Dukes of Burgundy. This led to growing divergence of interest between Charles V and Ferdinand: the latter became more occupied with the Ottoman threat and more willing to compromise within the HRE to retain their support. Among other things, Ferdinand was able to be more assertive - even against his brother's wishes - than he was in the past. In 1531 he was elected King of the Romans, which usually leads to HR Emperorship. Finally, at the Peace of Ausburg in 1555, he inserted the infamous "Ferdinand's clause" that exempted knights and some cities from religious uniformity.
By this point, Charles was likely to be suffering from depression or PTSD, which led to his absence from the Diet at Augsburg. He could not bring himself to consider any of the practical ways forward, thus he feigned illness. At the same time, there were many arguments between him, his brother Ferdinand, his son Philip II, and Ferdinand's son Maximilian II. The larger disagreements include how the HRE emperorship should be handled. Ferdinand wanted to keep it in his line of the family. Charles wanted a sort of time share. Philip wisely went around his own father to negotiate in Ferdinand's favor in order to preserve harmony in the family, after Charles and Ferdinand's sister Mary of Hungary had to be called from the Low Countries to help facilitate negotiations.
The divergence of interests
Now that the inheritance was split, the conditions of the time necessitated divergence of interests on both sides of the House of Habsburg.
On the Spanish side, Charles V had arranged for Philip, a recent widow, to be married to Mary Tudor, Catholic queen of England. They then became co rulers of both England and the Low Countries. This was the so-called "Northern Orbit" strategy. The hope was that it would set a lasting (Catholic) alliance between Spain, England, and the Low Countries. Of course, Mary died without an heir, and the Dutch revolt broke out, turning this arrangement into disarray. At the same time, Spain faced further challenges both in the Mediterranean and in her growing empire abroad.
On the Austrian side, the Ottoman threat dictated policy while the schism between Catholics and Protestants undermined potential for greater unity. The Austrians Habsburg, despite their continuing success in securing emperorship (except for short periods), had to manage their relationship with the Electors through accommodation. For all its failures, the Peace of Augsburg were able to stave off open religious warfare in the HRE, even as such wars broke out in France and in the Low Countries. Ferdinand and his successors were able to set up a military system that lasted centuries, including the infamous "Ottoman tax" and the military frontier in today's Balkans. This led to a policy of relative tolerance of the Reformation in Germany that preserved peace until the 30 Years' War in 1618-1648.
As an example of how they could and did make things difficult for each other, as the rebellion in the Low Countries against the Kings of Spain continued, in 1578 the rebels invited Archduke Matthias (future HRE emperor) to become their governor-general, in open defiance of his uncle Philip III II of Spain. Matthias happily explored this appointment, until he was sternly rebuked by Philip.
Given all this, were relationships hopeless? Not necessarily, for it depended on circumstances. Both sides earnestly did try to maintain good relationship with each other. It was customary for the two sides to exchange their sons and daughters for residence in the other's court. There were earnest attempts to consolidate the two houses, and to synchronize in ways to eliminate overlapping claims. In the 1617 treaty of Oñate, the Spanish Habsburgs gave up their claims on Bohemia and Hungary, in exchange for direct control of territories over the critical Spanish Road that linked Italy to the Low Countries. In 1634, as Spain threw her might into the morass that was the Thirty Years' War in Germany, the Spanish tercio of the Cardinal-Infante Ferdinand joined forces with that of his cousin the future emperor Ferdinand III, to crush the Swedish army at Nördlingen.
However, broadly speaking the two sides were each beholden to their own strategic circumstances, and had to prioritize their policies accordingly, even as cordial relations remained until the last of the Spanish Habsburgs, Charles II, died, ushering the War of Spanish Succession.
Want to know more? See:
G. Parker, Why Did the Dutch Revolt Last Eighty Years? Trans. Royal Historical Society, vol. 26, December 1976.
J. H. Elliott, Imperial Spain: 1496-1716, ISBN-13: 978-0141007038, 2nd ed 2002.
Aurelio Espinosa, The Spanish Reformation: Institutional Reform, Taxation, and the Secularization of Ecclesiastical Properties under Charles V, The Sixteenth Century Journal, Vol. 37, No. 1 (Spring, 2006).
/u/ekinda had made a nice timeline that you should check out here.