In France, detectives and police officers have to go the university to study the law and other subjects. I thought it was the same in most countries, isn't it?
Most large cities have their own police academy or there's a regional academy that several cities use. Police academy is usually three or four months of intensive training that new recruits go through (a little like boot camp for the armed forces). After graduating from an academy, the officers are sometimes rotated through probationary assignments and then given a more permanent assignment.
Detectives and other specialists are generally promoted out of the ranks of police officers.