First, Look at your question from the client's perspective.
They don't necessarily know you, your work ethic, or the quality of your code. Maybe they have a referral from someone they trust, but in many ways you are an unknown to them.
And then think about why they are interviewing you. They have a problem that needs to be solved; they need some code written or modified to support their business.
Keep in mind that they are asking for a sample in order to help answer those unknowns.
So what sort of a sample should you provide them?
The short answer is to provide them with a sample that comes as close as possible to matching their expectations.
The longer answer is that this can mean:
Nothing that's proprietary. If you send them a previous client's code then they'll know you'll do the same thing with their code.
Code that's in their preferred language. Don't send them a Java sample when they're working in C#.
Code that's in the same segment of the application stack. Don't send UI code if they need a service written. Likewise, don't send a database access / ORM piece if they need a visual.
Code that matches their likely request. Do they need maintenance? Show them a before / after picture and show how you made the requested changes within that project. Do they need a complete project? Then provide them with a small sample that mirrors everything that you would be providing as part of the contract.
Code that matches their business domain. Are they in product sales or perhaps services? Find a sample project that did the same or similar type of a thing.
As a freelancer, your code sample is a piece of your coding portfolio. Just like an artist, you need a catalog of previous work to show what it is that you can create. Working on open source projects can be one source of samples. You can also point to your StackExchange profile to help show some of your thought processes and communication skills.
Clients generally want a sample that they can dig through on their own. If they need a walk-through (via Skype) in order to understand the code, it may give the impression that they won't be able to maintain the code later on. If you generally provide documentation along with your contract work, I would include relevant samples of your documentation along with the code sample you provide.