I've started reading about VLans, do vlans always know what port to forward messages to or are the like switches and sometimes they don't know the mac address so they just flood it to all ports? Or does this not happen because of tagging?
A VLAN behaves exactly like a separate switch - frames are forwarded to the port the destination MAC address is associated with. It's rather unlikely that the switch hasn't learned the destination MAC but if it hasn't it floods the frame to all ports but the source port (emulating a repeater hub).
Whether or not the ingress frames were tagged doesn't matter. The egress frames are tagged as required by the respective port's configuration and the VLAN they're in.