Communities are usually applied to prefixes via route-maps. In your example, RouterA may have something like this:
route-map to-router-b permit 10
description Tag Prefixes with Community
match ip address prefix-list my-prefixes
set community 65530:1234 additive
The above will add an additional BGP community to the prefix on egress to RouterB (presuming the above route-map is set on the RouterB neighbour).
One thing to note is that communities are always manual (minus extended communities and some edge cases), this means that any prefix that ends up with a BGP Community has traversed somewhere that has a manually created route map.
Re: your second question, by default these will not be tagged with any communities however, the easiest way to do this is to apply a route map to the redistribute connected
and redistribute static
statements under the BGP hierachy like so:
router bgp 65530
address-family ipv4
redistribute connected route-map tag-with-community
redistribute static route-map tag-with-community
route-map tag-with-community permit 10
match ip address prefix-list my-prefixes
set community 65530:1111
My knowledge of Arista is minimal but if its anything like Cisco then a community-list won't do anything unless applied specifically to a route map or similar. Community lists can be handy when handling large sums of Communities. For example, say I decided to tag all of my internal prefixes with something like 65530:111X where X is a different digit per geographical location, I could create a community list to include the following:
ip community-list expanded All-My-Prefixes permit _65530:111._
This would then match all of my internal prefixes regardless of the last digit.