1. Use something like RanAS's layout maker
if you don't want to write the HTML yourself. Or get someone to make you one, but don't go PMing random people for it.
2. In Edit Profile
, there are options for post header and post footer, paste your code into there. Usually all layout codes have clearly marked which part should be in the header and which part in the footer.
3. Follow the rules under the Layouts section in the Rules page
edit: also, even if your layout gets removed, you'll get a PM from System with the code so you won't lose it.