I never heard the one about not putting onions into the compost bin. The worms will arrive as if by magic at some point when you are making compost - they are a good sign,they seem to arrive and vanish at different stages.
The biggest do n't is not to put cooked food,dairy or meat on the heap as you will attract vermin. The heap should not be too wet or too dry. The amount of time it takes will vary but the size and temperature of the heap will affect how rapidly it 'decomposes' into compost. Do not put too much grass cutting on in one go as they can slow the process down.
Making compost is not difficult, the first time you make it you learn the techniques required. There are several hubs on this subject - as you will see in the related hubs section - lots of different ways to achieve usuable compost.