A detective is considered an investigator - there are also detective specialists that are promoted to detective, hold that rank, get the pay, but remain in their non-investigatory unit - there are detective specialists for instance in the NYPD Emergency Service Unit (equiv. to a SWAT unit), and Aviation.
Investigatory detectives are also assigned to Highway Patrol to investigate accidents where someone is seriously injured and likely to die, or DOA.
Detectives start out as police officers and choose a career path that leads them to a "shield" - in the NYPD when a "White Shield" (police officer) gets transferred into an investigatory unit, such as Narcotics - s/he does 18 months of investigatory work and is then promoted to a "Gold Shield", Detective 3rd Grade. They can work their way up to eventually a 1st Grade shield, it is VERY hard to get that - this is NOT a civil servant exam promotion, but an internal department promotion. Detectives and Police Officers are still the same - no subordination above or below one another - although a detective at a crime scene has control over the scene, opposed to ordering an officer, they direct the officer to certain tasks.
Detective 3rd Grade makes a sergeants salary - 2nd makes a Lieutenants salary, 1st makes roughly a captains salary.
In the NYPD Sergeants and above may be the commanding officers of detective units overseeing the squad - usually these bosses were previously detectives who were promoted through civil exams.