In general a repair like this isn't easy for someone considers themselves a "novice". If you consider yourself this, you should consult your user manual or call your local mechanic.
Remove sunroof, put new rubber seal on and around glass. Make sure sealant is sealed correctly. Clean sunroof in and out real good. If you're a novice and needs help consult a professional mechanic.
Take sun roof out and put new rubber seal on it to seal around glass. Make sure you clean the sunroof in and out. Thats it or get a professional mechanic to do it if you don't know how.