This depends on each competition.
In La Liga, the exact date and time is not announced until some 10/15 days before the match. Until then, there is a sidebar alongside the match indicating that “time and date to be confirmed”. This sidebar disappears once the match has been confirmed.
In the UCL, both in the group stages and knockout phases, the dates are announced on the same day as the draw. Matches in the UCL at the Camp Nou usually kick off at 20.45.
In the Copa del Rey, the times and dates are confirmed a number of days after the draw is made.