In the USA police can generally hold someone for 24-48hours before actual charges are filed (it takes a minute to generate an indictment), allowing them to investigate and interrogate.
Then, if an indictment is filed a judge makes a decision on pre-trial confinement until trial. In France there is a general four month limit on pre-trial confinement before it has to be heavily justified.