To get mortars in Battlefield 3, you need to earn points while playing the Support class. Mortars can only be used when you're Support, and they're the last unlock in the class's progression, which goes in this order:
Keep racking up points as Support, and the mortar will eventually be yours.