Choose target creature you control and target creature you don't control. The creature you control gets +2/+1 until end of turn if it's a Knight. Then those creatures fight each other. (Each deals damage equal to its power to the other.)
If either target is an illegal target as Joust tries to resolve, neither creature will deal or be dealt damage.
If the creature you control is an illegal target as Joust tries to resolve, no creature gets +2/+1. If that creature is a legal target but the creature you don't control isn't, it still gets +2/+1 until end of turn if it's a Knight.
The target creature you control gets +2/+1 only if it's a Knight as Joust resolves. It'll still fight if it doesn't get +2/+1.
You can't cast Joust unless you choose both a creature you control and a creature you don't control as targets.