A buy order is used to enter a long position, while a sell order is used to enter a short position.