Submit to arxiv prior to a conference or journal
This differs by field. Your profile suggests you are a mathematician and in math, almost all journals will publish papers previously available at arXiv. 

The life sciences seem to be an exception with many journals refusing to publish anything previously published, even if informally. Wikipedia gives some guidance. 

I'll leave the issue of license to the other questions linked in comments.