I've been to over two dozen hackathons, some successful, most failed.
Here is what I learned:
1 - Don't sit in a corner, be in the middle or front towards the main stage, you want all the press to stop by and ask about your project.
2 - Come with a few ideas with various levels of do-ability. (Can do in time, might do in time, can get started and do a concept in time).
3 - Have a poster or something that will catch attention about your project as people walk by.
4 - Have visuals when you start (More on this)
5 - Have a team with you.
6 - Talk to everyone, meet other teams, hand out cards, connect on LinkedIn, network, network, network.
Come up with a couple of ideas before the event, if you have a team, your good, if not then get one. Where do you get a team, thats pretty simple, everyone has CraigsList so make an add in the "Gigs" for the team members you need, this is a great way to meet like minded people. If they ask how many events you have been and how much you expect to win, they are the wrong people. Don't expect to win, Don't expect to finish with everything you want, be happy to last the duration and build something.
Get in as early as possible, talk with people in line, make connections. If you have a team great, if not don't stress. When you get to the event grab a table or area, bring some visuals about your idea, maybe a screen shot or something. Most hakacthons allow you to do some level of design (ideas) before the event so have a graphics designer help, there are super cheap resources for this that I can point you to.
Even if you bring a team, get up and present your project, maybe there are others that have interest (You might even find a co-founder), most events have the initial part of the event where people look for team members so you stand up and present your idea and what you are going to do, why and how you are going to do it. Practice this presentation, dress professionally but comfortable.
Now that you are at the event and have made your initial presentation, you should have some team members, if not then accept defeat on your idea and join another team, there is no shame in working with others even if they do not like your ideas.
I have met to many people at hackathons, two of my best Android developers were people I hired from these events, one was on my team, another I talked with at the event. I have known them for years now.
For me its all about relationships and meeting people. I have led the team and I have been a team member, both are rewarding.
Unless its a major hackathon (Like TechCrunch Disrupt - what I have not missed for 3 years now) then just go and have fun.
When its over, some people will want to continue to work on the project, thats up to you.
Remember that when its all done and over with, what was built it NOT yours, its the teams, don't think that since its your idea that the work produced is yours, it does not work that way. You are not paying them so its a collaboration.
Don't come to a hackathon to built your prototype for a startup company, thats not the correct way to do it!
Have fun and enjoy!