You're a contractor when you're getting paid and a freelancer when you're unemployed.
But, seriously, in my experience in the USA, here's how it works.
A contractor generally works for one client on an exclusive basis through a recruiting/placement firm. They're essentially a temporary employee and will usually be expected to keep certain office hours and so forth. The projects will tend to be longer term, typically 3-12 months, although there are cases where short term projects are farmed out this way. You're paid by the hour, usually on a W2 basis, with the sponsoring company providing some benefits, taking care of employment taxes and taking a cut of the hourly rate. For example, you're paid $40/hr and the client is billed $70/hr for your time, the recruiter pockets the difference.
Freelancers generally work for multiple clients and find work on their own. They have a 1099 relationship with the client companies, meaning they're totally responsible for their taxes, including employment taxes, and benefits themselves. Most projects are short term or are on an "on call" basis. Some work on site but often they'll work from their own location and only visit the client office as needed. It's common for freelancers to get overbooked and not be able to complete work for all clients within the required time frames. That's why some companies, those that have been burned, prefer to use contractors since they have greater control.
There are some people who have kind of a hybrid arrangement where they work on a 1099 basis without a contracting company taking a cut but the tax laws can get messy if things aren't done right. I screwed this up once and ended up owing the IRS a huge amount of money.