If everything went great during your interview, but you ended up not getting the job, don't get discouraged. You may not have gotten the job offer because there wasn't really one to begin with.
According to the Wall Street Journal, the hidden job market can be hard to crack if you don't have connections. Many employers prefer to hire internally and may not even list the job opening, or some have already picked out their ideal candidate but go through the interviewing process to follow procedures.
So don't fault yourself over not getting the job — sometimes it's really out of your hands. Instead, focus on networking and going to events in your field. And even if you have a job, start building a stronger network so when it comes time to look for a new job, you'll will have more of an "in" with a few companies.