A registered agent is someone, either a company or an individual, that a corporation (or other legal entity) appoints to receive service of process and other official notices such as state franchise tax notices. Service of process is how a third party gives your company notice of a pending legal matter, which allows your company to respond accordingly with the applicable deadlines.
A corporation’s registered agent must be physically located within the relevant state. For example, if your Texas company is incorporated in Delaware, your company will need to hire a registered agent in Delaware. If your Texas company is incorporated in Texas, you or another shareholder or officer could be the Texas registered agent (assuming each resides in Texas).