Which version of X-Plane 10 are you using? Mobile or desktop?
Mobile autopilot works by tapping the top of the device screen, then tapping the "hdg" "pch" or "alt" buttons. Tap a second time to turn it off.
On desktop, the switch to control the autopilot is found on the far right side, labeled "flight dir." (Autopilot controls are boxed in red in image below.) It must be set to "auto" for the plane to fly itself. The altitude button will remember the last setting and get you there if the AP is turned on, or you can set it to your current altitude.