If you are not successful on either the direct appeal or the Petition for Discretionary Review, the next step would be a state writ of habeas corpus. Also, if you were not given permission for appeal, you may be able to go directly into a writ of habeas corpus.
In Texas, there are several types of post-conviction writs. What kind you will need to file will depend on what the outcome of your case was and what sentence you received.
But, a writ of habeas corpus is latin for “you have the body”. It is a legal vehicle to get back into to court and tell the State of Texas that you are illegally detaining an individual in violation of the constitution. The “great object” of the writ of habeas corpus “is the liberation of those who may be imprisoned without sufficient cause.” Ex parte Watkins, 28 U.S. 193, 202, 7 L. Ed. 650 (1830)