One reason why it may not work which I discovered while preparing this answer: if you have customized it using customize interface, emacs will insert code that sets cursor-type in the custom-set-variables section of your init file. So first make sure nothing about the cursor is present in the custom-set-variables section of your init file.
For the cursor color, you have it right.
(set-cursor-color "blue")
For the cursor type, the variable is cursor-type and you can set it using setq as shown here. You have more options that you can find with C-h v cursor-type RET
;; Empty box (setq cursor-type 'hollow) ;; Filled box (setq cursor-type 'box) ;; Thin bar (setq cursor-type '(bar . 2)) ;; Thick bar (setq cursor-type '(bar . 5))
For the blinking, there are two things that control it. The first one is the function blink-cursor-mode and the variable blink-cursor-blinks which are both described in the help for blink-cursor-mode:
If called interactively, enable Blink-Cursor mode if ARG is positive, and disable it if ARG is zero or negative. If called from Lisp, also enable the mode if ARG is omitted or nil, and toggle it if ARG is ‘toggle’; disable the mode otherwise. If the value of ‘blink-cursor-blinks’ is positive (10 by default), the cursor stops blinking after that number of blinks, if Emacs gets no input during that time.
So for example:
;; Blink forever (setq blink-cursor-blinks 0) (blink-cursor-mode 1) ;; No blinking (blink-cursor-mode -1)
This code in my init file on Emacs 27.1 on Windows 11 produces a cursor that is a blue box that blinks forever:
(set-cursor-color "blue") (setq cursor-type 'box) (setq blink-cursor-blinks 0) (blink-cursor-mode 1)
If this is not working, I would try emptying your config file completely and putting just this code then restart Emacs. That is what I did for this answer since I normally use evil-mode which allows me to define different cursors for normal mode, insert mode, etc. I didn't want that to interfere with the results.
Remember that if you tried to customize it, then your init file will contain (custom-set-variables '(cursor-type 'bar)) and people usually add stuff in their config file before this code so that your code setting the cursor to a box will be run before the code that sets it to a bar thus making it seem like your code is not doing anything.
EDIT: I read the back-and-forth in the comments in @NickD's answer so I see you've made good efforts to isolate this from the rest of your config by doing emacs -Q so your problem is very interesting.
emacs -Q, cut and paste the forms you added to your init file (modified as per the answer below) into the*scratch*buffer and evaluate each one by putting the cursor after its closing parenthesis and typingC-j. You might try a more obvious color than"blue"(I suggest"red") for checking. If that works, cut and paste the working forms into your init file and try restarting emacs (without the-Qthis time). If that does not work, then figure out why your init file is not being read. See gnu.org/software/emacs/manual/html_node/emacs/Windows-HOME.html for hints.emacs -Q? If not, please do so: it might be that something in your init is causing your emacs to behave differently from everybody else's, but both the above and theblink-cursor-modesetting behave differently in my case (and I presume in @amitp's case) than in yours, so my inclination is to blame your init file (or if you get the same behavior with-Q, your emacs build - where did you get your emacs and what is its version? DoM-x emacs-versionto find out the version).