A positive basis occurs when spot trades higher than the perpetual, and consequently a negative basis occurs when spot trades lower than the perpetual.
Typically, most coins will have a positive basis. The reason for this is partially due to the inability to short spot. It is possible to use margin to short spot but it can be tougher to do on coins that are not large caps such as BTC or ETH. Due to this, perpetuals tend to trade a bit cheaper than spot due to the fact that if a trader wanted to long — they could do so on the perp or on spot, but if they want to short then really the only way to do this would be to short the perp. Due to this, traders are typically willing to sell perpetuals below the spot price.
When the price of an altcoin rises, its basis tends to rise as well. This occurs due to two main factors.