Richard Lovelace was a big fan of his king, Charles I. "To Althea, from Prison" is as much about Lovelace's ability to overcome his circumstances as it is about the "loyal flames" that he and his buddies display for their king. In the third stanza especially, Lovelace describes the king's "sweetness, mercy, majesty" and says he is not afraid to voice "aloud" his loyalty to His Majesty. As it happens, this poem came about as a result of Lovelace doing that very thing—for which he was thrown in jail, which is the setting of this poem… in which he praises his king. It's an endless loop, really.
Watch your step! The poem celebrates loyalty but implies that it can be dangerous. The phrase "loyal flames," for example, implies something at once both powerful and potentially harmful.
Nice try, Lovelace. Such loyalty to one's king, or to one's leader, means that one can never be 100% free.