Closing a position requires doing the opposite operation to the one that led to its opening.
For example, if you opened a LONG (buy) position for 1 contract, you must post an order, market or limit, SHORT (sell) for 1 contract.
An opposite order for an amount less than your original order will result in a partial close.
A higher amount order will result in a full close of your original position and the opening of an opposite position for the remaining amount.
A few very important notes:
Pressing the "Close Position" button is equivalent to placing a market order for the full amount of your position. Be careful, as a market order the execution price may be different from the mark price you see on the exchange!
Remember that posting a limit order does not imply that it is successful! You may not be filled or may be only partially filled, depending on market conditions.
Options, of course, have one more possibility: if taken to expiration, they automatically close.