The Spanish first division contains 20 teams, although there have been discussions to reduce to 18. It went from 18 teams to 20 in 1988, and increased to 22 in 1995 following a major administrative mix-up when two teams were relegated for not presenting financial guarantees on time, and were then reinstated following lengthy appeals (this didn't help Sevilla, who were relegated the following season anyway). Although reduced two seasons later to 20, small clubs have since resisted any further change as relegation to the second is an economic disaster, although UEFA are threatening to reduce the number of clubs eligible for European competitions if the reduction doesn't take place.
The Spanish second division is made up of 22 teams from the whole of Spain, and lower divisions are regionalised. For some reason football authorities don't like the idea of 1st, 2nd, 3rd etc. In England the first division is the premier league, the second division is called the championship and so on. In Spain, the second division is the division 2A, the third division is the division 2B (groups 1 to 4), and the fourth division is the division 3 (groups 1 to 20). This presumably gives players and clubs more status, rather like calling a junior buyer a purchasing executive, or a dustbinman a refuse disposal operative.
The bottom three clubs in the first division are relegated automatically, and the top two of 2A are promoted, with a third coming out of a play-off between sides in third to sixth place. The bottom four of 2A are relegated, and the top four of each of the four groups of 2B go in to playoff groups for the four spots in 2A. Similar systems apply to the third and lower regional divisions.
One difference with English football is that reserve teams (called team B, C, etc.) of the top clubs play in the lower divisions rather than in a separate league, although the lower ranked team cannot play in the same division as the higher team. The best known case is the Real Madrid reserve team of 1979/80, then known as Castilla (containiing a young Michel, Butragueño, Sanchis etc), who won the second division, but could not be promoted.
They also reached the Spanish cup final but lost against Real Madrid by 6-1, needless to say. Another case in point was when Barcelona B were demoted from 2A to 2B, Barcelona C were automatically relegated from 2B to division 3. In order to avoid manipulation of teams, only players under 23 (25 with a professional contract) can switch between first and second teams, and first team players cannot play in the reserve team as they do in England, for example when coming back after an injury.
Spanish squads are closely regulated in Spain, and transfers between teams are more limited than in e.g. England. There are limitations on players switching between teams in the same division during a season, and clubs register a first team squad of a maximum of 25 players for the whole footballing year. A window does however open up for one month in January allowing players who have not played much for their clubs in the season to be transferred. First team players wear numbers one to 25, and juniors are numbered from 26 onwards (see above). Non EU players are limited to three per squad, and there are plans to reduce this further in coming years.
As in England and most European countries, there are three points for a win and one for a draw. If clubs are level on points, the particular goal average between the two sides counts before the general goal average. So, for example, if X beats Y 2-1 at home, and loses 2-0 away during the course of the season, Y is placed higher in the league, even if their general goal average is worse. If 3 or 4 teams are equal, only the matches between those teams are taken into account, and a mini-league table is computed to decide who has finished higher.
La Copa del Rey, the Spanish cup competition, is given less importance than in England, and seems to be played just to fill one more place in European competitions. Many managers have been sacked for winning the cup and not the league, but very few the other way round!