There are many topics about this already, but you can get XP mainly from writing comments and making threads, BUT you will lose XP when your posts are removed or flagged as spam, and you only earn XP for about 5 comments a day. You can also earn some XP from certain tasks.