When you open a position for a perpetual contract, you enter an agreement to trade against the price movement of the underlying asset. The price of the perpetual contract is always anchored as closely as possible to the price of the underlying asset via the funding rate.
To “go long” is to enter a perpetual contract believing that the price of the asset, and therefore the price of the contract, will increase. When it does, you then have the opportunity to close your position and sell the contract at a higher price than when you entered (or bought it), thereby profiting from the upward price movement.
To “go short” is to enter a perpetual contract believing that the price of the asset, and therefore the price of the contract, will decrease. When it does, you then have the opportunity to close your position and buy the contract at a lower price than when you entered (or sold it), thereby profiting from the downward price movement.
Perpetual contracts do not have an expiry date, and you can hold your position open for as long as you don’t get liquidated.