A subpoena is an order of a court which requires a person to be present at a certain time and place or suffer a penalty (subpoena means, literally, “under penalty”). This is the traditional tool used by lawyers to ensure that witnesses present themselves at a given place, date and time to make themselves available to testify.
What is a writ?
An official court document, signed by a judge or bearing an official court seal, which commands the person to whom it is addressed, to do something specific. That "person" is typically either a sheriff (who may be instructed to seize property, for example) or a defendant (for whom the writ is the first notice of formal legal action. In these cases, the writ would command the person to answer the charges laid out in the suit, or else judgment may be made against them in their absence).