Here is a code in Visualforce which will work:
<apex:pageBlock id="theBlock">
<apex:inputCheckbox value="{!theSObject.CheckBox__c}">
<apex:actionSupport event="onchange" rerender="theBlock"/>
</apex:inputCheckbox>
<apex:inputText value="{!theSObject.TextField__c}" disabled="false" rendered="{!(theSObject.CheckBox__c == true)}"/>
<apex:inputText value="{!theSObject.TextField__c}" disabled="true" rendered="{!(theSObject.CheckBox__c != true)}"/>
<!-- Or to simply have a field that appears only when the box is checked -->
<apex:inputText value="{!theSObject.TextField__c}" rendered="{!(theSObject.CheckBox__c == true)}"/>
</apex:pageBlock>
Are you interested in learning Salesforce from the basics! Refer to this video on salesforce provided by Intellipaat:
In addition to this, you can add an action in the action support if you wish to do further processing in Apex, like this:
<apex:actionSupport event="onchange" action="{!myMethod}" rerender="theBlock"/>
Note: The actionSupport event for a checkbox should be on click, on change is not reliable across all browsers.