When would one use ahlan instead of as-salaamu alaikum?
one is just more formal and traditional: 'as-salaamu 3alaykum' (may peace be upon you)
أَهْلاً يا دُوو :)
Is there any difference with this word and "marhaba?" Both mean "hello," right? Is one more formal or relaxed than the other?
Not sure, but as I understand marhaba means "welcome", and is sometimes used as a greeting.