It depends on the purpose of what you're looking into and who it is you're contacting.
Most communicate with us daily and we're not aware of it. Some would rather send messengers or sentinels to do the communicating for them and then there are ones you never want contact, for any reason.
If you're looking for favor, blessing, or assistance in the craft, setting up a sacred space for them to come to meet, is favorable. For other needs, focusing on them and sending your thoughts to them, essentially prayer, works well enough, but you must be patient and seek the answer actively. They may not answer as directly as you'd like.
Contacting deities- God(s), and Goddess(s) really are dependent of your personal practices and overall preferable habit of conveyance. No matter if you are eclectic or a strict/loose practitioner of a particular faith the best way from experience would be find your own niche in communication. There is no right or wrong way, just preffereence to you and the deity themselves based on how they recieve you .
Depending on the type of deity it is, I would approach them with their specific interests on backroung to premordial lore or to your interpretations to their being as a whole. As the other response mentioned, many times we are constantly recieving messages from the gods, unable to decipher or necissarly percieve them easily.
Simple prayer w/ candles, stones gems assoctiated with god/goddess/being
Offerings: often dependending on pantheon, grains, milks, mead, fruits, flowers, etc
Song/Spoken Poetry Invoke
Direct Word : speak openly to diety in a quiet place most fitting.