Welcome!
Defending:
Pump out as many units as you can.
Build as many towers as you can.
Build lots of Battle Machines.
Set up ambushes if you can.
Focus on doing combat around your towers.
Defensive Tactic:
Send units out in between the routes the scouts take to find you, then when they find your one man, the enemy army will go there.
The enemy may send out another scout.
This can ward of an attack entirely, or it can delay it some.
This only works against the AI.
Attacking:
Make sure your defense will hold.
Produce a small group of horseman(say ~10)
Produce a large group with 25+ infantry, 2+ catapults, 2+ battle machines.
Send the small group, somewhere near the enemy base, where they would be found by a scouting party, (you want this small battle to take place out of the path of the big army).
Now get you big army placed somewhere around there base where they
won't be attacked.
When your small army is found, the enemy will attack them.
This is the time to strike with your large army, send your infantry in first to swarm all resistance, then use the catapults to wipe out the towers, and use the battle machines to guard the catapults and take fire for them.
After the base is de-fortified, focus all fire on the castle(s).
With 2 catapults the castle(s) should go down fast enough so you will probably win before the enemy army has chance to get back.
If that is not your last/only enemy, then you need to quickly evacuate their base.
Good luck dude!