How are the teams selected to enter the World Cup?

For example, in the World Cup, there will be 13 places in Europe, 4 places in Africa, 4.5 places in South America, 4.5 places in Central and North America and the Caribbean, 4.5 places in Asia and 0.5 places in Oceania. Together with the host country, it will be the top 32.