Without more background info I can't give you specific recommendations but here are my general ones. Some of my recommendations are very basic with the hope they help someone so don't be insulted if you already know or understand some of this.
Freelancing is a Business
-------------------------
First make sure you realize you're starting a business. You may be working by yourself but you're starting a business like any other. You'll need to do accounting, marketing and sales, planning, etc. You can't sleep all day, lounge around, and expect work to get done. Make sure you're disciplined enough to do the work.
If you have a full time job don't quit just yet. Get a few freelance projects under your belt first. Make sure you have months of income in the bank to get you through the slow times. If you've decided to move to freelance because you lost your job think long and hard about it. Do you want to run your own business or do you just like to code? Are you prepared to chase down clients and sell your services to them?
Learn about billing and invoicing. Don't expect to bill 40+ hours a week, especially when you first start. There's overhead in running any business. You'll have tasks that aren't billable. Account for this.
You need to have people skills to run a business, especially if you haven't already established yourself. If you're not great at selling or interacting with people focus on improving these skills.
Build Credibility
-----------------
Your potential clients need to know you're credible. This is why many people have recommended improving your portfolio. In reality there are multiple ways to build credibility and the best one for you depends on what you do.
Understand your target client. You are trying to sell your services to them. You need to know what they want and need. If your client isn't technical then what good will code samples do? If your client is the CTO of a development firm how useful will a pretty website be without code?
In general it's a good idea to have a nice looking website with some sample work. It doesn't need to be an amazing design but make sure it doesn't look like a coder with no design skills made it. Pay someone if you have to, you want your business to look good after all.
The actual samples and quantity doesn't matter too much so long as it fits two criteria: it's good and it highlights what you do. If you write code have a few samples from the languages you work in. If you build basic content sites for businesses (eg CMS or ecommerce sites) put some screenshots up or link to them. If you're a designer put up some nice designs.
Portfolios are best for incoming leads, when potential clients come to you. They don't know who you are and are making a judgement based on your website. As I highlight below networking is a much better and more likely way for an unestablished freelancer to get work. Don't expect many (if any) people to stumble onto your portfolio and hire you from it.
While a portfolio style website is nice it's even better if you can establish yourself through work, video, or words. This means blogging, speaking at conferences, starting or contributing to open source projects, and hosting or organizing events related to your expertise. Establish yourself as an expert at what you do.
Set an hourly rate that reflects your skills and raise it over time. I recommend billing at least $50 per hour. Setting a higher rate actually implies credibility. That said, you'd better be able to deliver. Someone paying for your time expects to get quality work out of it.
You'll always have more credibility if you can meet someone in person. Which leads to networking.
Network, Network, Network!
--------------------------
In my opinion this is the absolute best way to get clients. Get out there and meet them in person. Reach out to people you've worked with in the past and see if they need some work done (don't steal your employer's clients though). Get on meetup.com and go to events, lots of them.
Don't network for just yourself, do it for others. If you run into someone who needs a designer but you write code put them in touch with a freelance designer who does good work. Help out your fellow freelancers and small business owners and they will return the favor. Even if they don't you'll be happy to know you helped a friend.
Try Everything
--------------
Just because people are giving you recommendations doesn't mean you can't get work elsewhere. Try everything that comes to mind.
Try looking through the computer gigs section of craigslist. I tried this once when I needed new clients. I emailed less than 10 people, had a few respond, and ended up with one client.
Get Your Hands Dirty
--------------------
Finally, be prepared to do work you hate when you first start out. You may have to accept work you don't enjoy doing to establish yourself and get experience. My first substantial freelance gig was a content site / CMS project. I hate content sites. I find them tedious and boring. I did it anyway. You have to do what you have to do.
Once you start getting enough work you can turn down projects you don't want to do. Find what you like, focus on that, but for now do whatever people will pay for.