Trap Doors open upward if the character opening it is below the Trap Door's level, and downward if above. The reference point for character altitude seems to be the character's center, not the feet: the character's feet can be about one half tile below the bottom of a closed Trap Door (standing on a stair), and the door will still open downward.
Trap Doors can be blocked by furniture and will then always open on the free side, regardless of character position. If a Trap Door is blocked on both sides, it will not open. An open Trap Door is too narrow to be used at the end of a ramp or stairway so that a character can climb through it without jumping, as it needs to be surrounded by solid blocks, not platforms or other Trap Doors.
Like normal doors, Trap Doors can be wired to be opened and closed remotely.