I'm old, I've been to lots of funerals. Wear something dark and conservative, suit or dark shirt-sweater-pants type. Greet the "host/ess" - the parents, in this case, I guess, say you're sorry to hear the news, and it's usually a good idea to say something nice about the departed like "she introduced me to my girlfriend, I'll never forget her" or whatever. Shake hands with the other relatives-friends who are clustered about expectantly waiting to find out who you are.
Conversation is usually along the lines of "how did you know the deceased?" "glad we got good weather for this/too bad the weather isn't better" "where are you from etc".
It's always okay to sit there quietly and look pensive.
Very often there are family disagreements and so on, if you don't know the politics, don't worry about it, just try to stay out of it. With luck you can ask someone about the dirt, and you'll get some interesting stories. With bad luck you might insult somebody, so watch out who you ask. Don't be surprised by people acting strangely, something about funerals brings out wierd family stuff.
There's usually a ceremony, a burial, and a gathering afterwards. At a lot of ceremonies, it's customary for a bunch of people to get up and say good things. If you want to, it's okay to, but maybe not the story about the dog, the goat and the experimental chemicals, unless you know your audience really well. Unless the burial is at the same place as the ceremony, you don't have to go to the burial if you don't really want to, nobody cares (unless it was your own mother you're burying).
Small talk is generally on the quiet side. Very often at funerals you run into people you haven't seen in a long time, so you can catch up. The afterwards gathering may just be people clustered around the parking lot, or it might be at a house, or formal. It's not as somber, especially if you're chatting with old buddies, but it isn't usually a wild bash.
Be extra polite, say thank you a lot. Don't eat too much and don't stay too long. A final farewell to the host/ess is in order.