Sirrah! ye are God's silly vassal; there are two kings and two kingdoms in Scotland: there is King James, the head of this commonwealth, and there is Christ Jesus, the King of the Church, whose subject James the Sixth is, and of whose kingdom he is not a king, nor a lord, nor a head, but a member.
Erastianism is the doctrine of the supremacy of the state in matters ecclesiastical (in sacris as opposed to circa sacra). As articulated by the man from whose name the doctrine is taken, the doctrine did not extend quite so far; Thomas Erastus (1524-1583) originally argued, in a treatise written in 1568, but only published posthumously in 1589,* that it was not in power of the church to excommunicate church members (the pastoral office could persuade but not censure by withholding the sacraments), but it was left to the civil magistrate to punish sinners. It was Richard Hooker, who began to publish Of the Lawes of Ecclesiastical Politie in 1594, and Hugo Grotius, writing on behalf of the Remonstrants in 1617 when he published De Imperio Summarum Potestatum Circa Sacra (On the Power of Sovereigns Concerning Religious Affairs), who contributed most notably towards promulgating what we now know as 'Erastianism'. Erastus himself was a notable physician, perhaps the best in Germany in his day, and a lay member of the Heidelberg consistory at the very same time that the Heidelberg Catechism was written. In that capacity, he resisted efforts to introduce Presbyterian church polity.
The Erastian cause was represented at the Westminster Assembly by such men as Thomas Coleman and John Selden. They failed to win the Assembly to their point of view, however. George Gillespie, one of the Scottish commissioners to the Assembly, wrote a masterful refutation of Erastianism entitled Aaron's Rod Blossoming: Or, The Divine Ordinance of Church Government Vindicated (1646). The Westminster Confession of Faith is decidedly anti-Erastian (although a fundamental misapprehension of the doctrine of church-state relations as stated in WCF 23.3b and elsewhere has ironically often led to the misdirected charge of 'Erastianism' against the original Confession, which would have surprised the Erastian party at the Assembly). The Assembly took great pains in a petition to Parliament to try to persuade it to steer clear of Erastianism, even noting that Erastus himself was a better physician than a theologian.
Journal of the House of Lords 7:524 (August 4, 1645) (see also A.F. Mitchell, The Westminster Assembly: Its History and Standards, p. 294):
Nor do we find that there hath been any great Doubt or Question made thereof in the Church, until Erastus, a Physician, who by his Profession may be supposed to have had better Skill in curing of the Diseases of the Natural, than the Scandals of the Ecclesiastical Body, did move the Controversy.
Ultimately, the British Parliament ratified the Westminster Confession of Faith as the doctrine of the Church England, with the following exceptions: WCF 20.4 (concerning the magistrate's authority to censure in connection with Christian liberty), chapter 30 (on church censures), and chapter 31 (on synods and councils). The General Assembly of the Church of Scotland too added a caveat when ratifying the Confession in 1647 to avoid even the appearance of Erastianism by explaining that it understood the magistrate's authority described in 31.2 as confined only to "kirks not settled or constituted in point of government" and affirming that that the power to convene church synods is directly given by Christ to the church and not dependent on the magistrate for its exercise (meaning that magistrates who are enemies of Christ and the church cannot legitimately prevent the church from convening such an assembly). Yet the Church of Scotland, known for its adherence to the crown rights of King Jesus, that is, the principle that Christ alone is head of the church and not the sovereign magistrate, whose encroachments must be resisted, did not actually amend the Confession at any point and found nothing in WCF 23 to be Erastian.
For a helpful guide to Erastian views contrasted with Biblical and Presbyterian principles, see William Cunningham, Discussions on Church Principles: Popish, Erastian, and Presbyterian (1863) -- see chapter 8 in particular here.
* The original title was Explicatio gravissimae quaestionis utrum excommunicatio, quatenus religionem intelligentes et amplexantes, a sacramentorum usu, propter admissum facinus arcet, mandato nitatur divino, an excogitata sit ab hominibus. "It consists of seventy-five Theses, followed by a Confirmatio in six books, and an appendix of letters to Erastus by Heinrich Bullinger and Rudolph Gaulther, showing that his Theses, written in 1568, had been circulated in manuscript. An English translation of the Theses, with brief life of Erastus (based on Melchior Adam's account), was issued in 1659, entitled The Nullity of Church Censures; it was reprinted as A Treatise of Excommunication (1682), and, as revised by Robert Lee, D.D., in 1844." (Wikipedia) Theodore Beza responded to Erastus' treatise directly in 1590 with Tractatus de vera excommunicatione.