In Schubert's Impromptu Opus 90, No 4, D899, the middle section is marked as a trio. Why is the middle section a trio? I don't think there are three voices and as it is composed for the piano there are not three instruments to play that section.
Baroque suites contained two minuets. Performers usually played the first minuet, then the second minuet, then the first minuet again. During the seventeenth century, French Baroque music often scored the second minuet for three instruments. People called the second minuet the trio even if it was not scored for three instruments. During the Classical period, all the dance movements in Baroque suites fell out of fashion except for the two minuets. Composers incorporated this form in sonatas, chamber music, and symphonies. Romantic composers like Schubert also used this term for an ABA movement. Schubert calls the middle section a "trio" because it is sandwiched between the first and second appearance of the main theme. This is similar to the baroque minuets because the piece is in 3/4 time, like a minuet. The Schubert Impromptu in A-flat Op. 142 No.2 D. 935 also has a "trio" movement in the middle.
Trio just means somehow related to three. This may be three instruments, but also a piece of music with a three-part structure. A classical trio has this structure (A-B-A), meaning that the first part (A) is repeated after a typically distinctly contrasting part (B). For further details see e. g. Wikipedia