Mixed-race person here; It is self-identified.
This is actually kinda confusing because the various forms never provide any guidance on how to determine what race you are for the purpose of the form. I have a Black[1] grandfather but look either Italian, Hispanic, or Sephardic Jewish. This led to me incorrectly identifying what race I was and mostly being annoyed by the question[2]. For example, when I applied to MIT I agonized over what to put and just decided to check both "white" and "African-American" and call it a day. When graduation was coming up, I got an email about a kente stole ceremony and...felt awkward. Aside from doing this one small not-valuable program with the Office of Minority Education, I didn't really participate in black life at MIT at all. This was also around the time when people were having a bunch of discussions about Treyvon Martin and white privilege and I realized that the things people were talking about the experience of growing up as a black man in America did not match mine at all. Basically, it wasn't until senior year that I realized that I was probably white and had white privilege.
I had some trouble accepting this, as identifying as white felt a bit like a betrayal of my mother and grandfather. So, I started reading a bunch of books like How to be Black, The Souls of Black Folk, and How the Irish became White[3]. I learned some pretty interesting things[4] and accepted that in almost[5] all contexts I am white. if someone (like a friend of mine from Canarsie) says I'm Black, thats fine. But on any sort of form, white is what I put down.
[1] Chromatically about the same as Morgan Freeman. He married a Swede and my mom married an Irish/Polish/German/Dutch/Englishman.
[2] It is plausible that a mixed-race person could put "half-elf" on their census form out of annoyance before learning that doing so is a federal crime...
[3] My strongest actual ethnic identity is Irish. I play the Bodhrán, have been known to jig and sing folk songs, have marched in a clan rally in Co. Longford.
[4] Did you know that 7 out of Homer Plessey's 8 grandparents were white and his legal team had to specifically arrange for him to be arrested and charged with violating the Louisiana railroad segregation statute in order to start the legal challenge that unfortunately led to the "Separate but Equal" ruling?
[5] Exception: watching 12 Years a Slave with my mother.