How do they get assigned?

This is for any naval aviator. How does a pilot get assigned a squadron/how do they find out which then leads them to their ship? For example how how a pilot know they’ve been assigned to vfa-41 which would I believe put them in the uss Abraham Lincoln
How do they get assigned?
Post Opinion