How long does it take to get a machined part made?

This very much depends on the complexity of the part.

For simple parts, you can work on yourself in a machine shop you have access to: You can have the part ready in hours.

For complex parts that require a 5 axis CNC machine: Typical lead times are in the 5-6 week range.  You can sometimes expedite the process by paying a premium and shorten the lead time to 4 weeks.